diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-20 01:29:11 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-20 01:29:11 +0000 |
commit | 70cc319b87f7a8c8fa57e5fb577d56c519884dda (patch) | |
tree | 091acc4bff3a178fde0b20622fd805a0e7988d5b | |
parent | 0d62f283d6df79b75cdbbf79cce4b8aad9cbc778 (diff) | |
parent | 97dddf39cd98d49f02b9adae3b7aeb3b28c434a6 (diff) | |
download | gitlab-ce-70cc319b87f7a8c8fa57e5fb577d56c519884dda.tar.gz |
Merge branch 'disable-issue-by-email' into 'master'
Disable “issue by email” feature until it uses a different token
Separate token being worked on in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5914, but too late for 8.11.
See merge request !5915
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/models/project.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/email/handler.rb | 3 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/email/handler/create_issue_handler_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG index c8c3727873f..c6a4fe5f5b8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -90,7 +90,6 @@ v 8.11.0 (unreleased) - Add archived badge to project list !5798 - Add simple identifier to public SSH keys (muteor) - Admin page now references docs instead of a specific file !5600 (AnAverageHuman) - - Add a way to send an email and create an issue based on private personal token. Find the email address from issues page. !3363 - Fix filter input alignment (ClemMakesApps) - Include old revision in merge request update hooks (Ben Boeckel) - Add build event color in HipChat messages (David Eisner) diff --git a/app/models/project.rb b/app/models/project.rb index f9c48a546e6..1855760e694 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -611,7 +611,10 @@ class Project < ActiveRecord::Base end def new_issue_address(author) - if Gitlab::IncomingEmail.enabled? && author + # This feature is disabled for the time being. + return nil + + if Gitlab::IncomingEmail.enabled? && author # rubocop:disable Lint/UnreachableCode Gitlab::IncomingEmail.reply_address( "#{path_with_namespace}+#{author.authentication_token}") end diff --git a/lib/gitlab/email/handler.rb b/lib/gitlab/email/handler.rb index bd3267e2a80..5cf9d5ebe28 100644 --- a/lib/gitlab/email/handler.rb +++ b/lib/gitlab/email/handler.rb @@ -4,7 +4,8 @@ require 'gitlab/email/handler/create_issue_handler' module Gitlab module Email module Handler - HANDLERS = [CreateNoteHandler, CreateIssueHandler] + # The `CreateIssueHandler` feature is disabled for the time being. + HANDLERS = [CreateNoteHandler] def self.for(mail, mail_key) HANDLERS.find do |klass| diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index cb445e22af0..2e595959f04 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -525,7 +525,7 @@ describe 'Issues', feature: true do end end - describe 'new issue by email' do + xdescribe 'new issue by email' do shared_examples 'show the email in the modal' do before do stub_incoming_email_setting(enabled: true, address: "p+%{key}@gl.ab") diff --git a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb index e1153154778..a5cc7b02936 100644 --- a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb +++ b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' require_relative '../email_shared_blocks' -describe Gitlab::Email::Handler::CreateIssueHandler, lib: true do +xdescribe Gitlab::Email::Handler::CreateIssueHandler, lib: true do include_context :email_shared_context it_behaves_like :email_shared_examples diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index d1f3a815290..9a3660012f9 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -247,7 +247,7 @@ describe Project, models: true do end end - describe "#new_issue_address" do + xdescribe "#new_issue_address" do let(:project) { create(:empty_project, path: "somewhere") } let(:user) { create(:user) } |