diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-20 13:01:08 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-20 13:01:08 +0300 |
commit | 797af06491b8e9bbc7eb75466b0cf3fabd0f14d8 (patch) | |
tree | a9aee22a17942adf5722ae1057536581896a1e72 /app/services/system_note_service.rb | |
parent | 6eb31056346ed07db4f66e4ba2369ff9779230c5 (diff) | |
parent | 01fe50a72513a88f2168c8c0a649661b1382a42b (diff) |
Merge branch 'master' into feature/issue-move
* master:
Fix bug where wrong commit ID was being used in a merge request diff to show old image
Remove CHANGELOG item that was added during merge resolution
Improve the "easy WIP & un-WIP from link" feature
Fix specs
\#to_branch_name now uses the iid as postfix
Add label description in tooltip to labels in issue index and sidebar
Easily (un)mark merge request as WIP using link
Use specialized system notes when MR is (un)marked as WIP
another attempt to fix oauth issue
attempting to fix omniauth problem
Conflicts:
app/assets/javascripts/issuable_form.js.coffee
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r-- | app/services/system_note_service.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index b2b5c8b83bd..e022a046c48 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -144,6 +144,18 @@ class SystemNoteService create_note(noteable: noteable, project: project, author: author, note: body) end + def self.remove_merge_request_wip(noteable, project, author) + body = 'Unmarked this merge request as a Work In Progress' + + create_note(noteable: noteable, project: project, author: author, note: body) + end + + def self.add_merge_request_wip(noteable, project, author) + body = 'Marked this merge request as a **Work In Progress**' + + create_note(noteable: noteable, project: project, author: author, note: body) + end + # Called when the title of a Noteable is changed # # noteable - Noteable object that responds to `title` @@ -210,7 +222,7 @@ class SystemNoteService # Called when a branch is created from the 'new branch' button on a issue # Example note text: # - # "Started branch `201-issue-branch-button`" + # "Started branch `issue-branch-button-201`" def self.new_issue_branch(issue, project, author, branch) h = Gitlab::Application.routes.url_helpers link = h.namespace_project_compare_url(project.namespace, project, from: project.default_branch, to: branch) |