diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-14 12:40:42 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-14 12:40:42 +0300 |
commit | 49506fc71a03e39a1a316e6740423a44030526ed (patch) | |
tree | b264b83f69fb833a6d950107b11c0c89cd9effb3 /app/models/commit.rb | |
parent | 55d4e2647d10a237705a1e2a65e24f33f654c75b (diff) | |
parent | 3f1ece26909f90e538a50cd724b64da28f0b7308 (diff) | |
download | gitlab-ce-49506fc71a03e39a1a316e6740423a44030526ed.tar.gz |
Merge remote-tracking branch 'origin/issue_closing_widget'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
CHANGELOG
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 81875e1be2d..82876e10446 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -111,22 +111,10 @@ class Commit description.present? end - # Regular expression that identifies commit message clauses that trigger issue closing. - def issue_closing_regex - @issue_closing_regex ||= Regexp.new(Gitlab.config.gitlab.issue_closing_pattern) - end - # Discover issues should be closed when this commit is pushed to a project's # default branch. def closes_issues project - md = issue_closing_regex.match(safe_message) - if md - extractor = Gitlab::ReferenceExtractor.new - extractor.analyze(md[0]) - extractor.issues_for(project) - else - [] - end + Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project) end # Mentionable override. |