diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-05-03 17:28:00 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-05-07 14:09:47 -0300 |
commit | 3063225ca289e87c3f590e1722451a1c674e2ac9 (patch) | |
tree | ec42bcdecce8c3064c61e606da059a019e2a95c2 /app/models | |
parent | e8b116ab94828b1354cf50934f49f37f3b012da2 (diff) | |
download | gitlab-ce-3063225ca289e87c3f590e1722451a1c674e2ac9.tar.gz |
Display merge commit SHA in merge widget after merge
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 |