Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-04-04 13:36:58 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-04-04 13:36:58 +0300
commitd67d43d1b693a37da73c8469e9b5c6c6f53ed0fa (patch)
treef225c33d0ed0d7bc3a69fc6610c29504617fccad /app/services/system_note_service.rb
parentb57ed57f6b0100b2f8c5b062bac10628ce3bbacd (diff)
Split status and confidentiality action
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index d3e502b66dd..35cfcc3682e 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -183,7 +183,9 @@ module SystemNoteService
body = status.dup
body << " via #{source.gfm_reference(project)}" if source
- create_note(NoteSummary.new(noteable, project, author, body, action: 'status'))
+ action = status == 'reopened' ? 'opened' : status
+
+ create_note(NoteSummary.new(noteable, project, author, body, action: action))
end
# Called when 'merge when pipeline succeeds' is executed
@@ -273,9 +275,15 @@ module SystemNoteService
#
# Returns the created Note object
def change_issue_confidentiality(issue, project, author)
- body = issue.confidential ? 'made the issue confidential' : 'made the issue visible to everyone'
+ if issue.confidential
+ body = 'made the issue confidential'
+ action = 'confidential'
+ else
+ body = 'made the issue visible to everyone'
+ action = 'visible'
+ end
- create_note(NoteSummary.new(issue, project, author, body, action: 'confidentiality'))
+ create_note(NoteSummary.new(issue, project, author, body, action: action))
end
# Called when a branch in Noteable is changed