diff options
author | Robert Speicher <robert@gitlab.com> | 2018-05-07 22:17:55 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-07 22:17:55 +0000 |
commit | b69ade5dd1eca99bff388240a184b6a579196f9d (patch) | |
tree | bc568a5af275a74d29c92235a9695f47aca13378 /app/models | |
parent | 4ac42e48344d4971913e8ed4afca27d0bdf07929 (diff) | |
parent | 3063225ca289e87c3f590e1722451a1c674e2ac9 (diff) | |
download | gitlab-ce-b69ade5dd1eca99bff388240a184b6a579196f9d.tar.gz |
Merge branch '43557-osw-present-merge-sha-commit' into 'master'
Resolve "Display merge commit SHA in merge widget after merge"
Closes #43557
See merge request gitlab-org/gitlab-ce!18722
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 63c6ada86e1..628c61d5d69 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1007,6 +1007,10 @@ class MergeRequest < ActiveRecord::Base @merge_commit ||= project.commit(merge_commit_sha) if merge_commit_sha end + def short_merge_commit_sha + Commit.truncate_sha(merge_commit_sha) if merge_commit_sha + end + def can_be_reverted?(current_user) return false unless merge_commit |