summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-12-28 10:44:25 +0000
committerDouwe Maan <douwe@gitlab.com>2018-12-28 10:44:25 +0000
commite9b5b10a454c0ca37cdf3abc1712ee391e9e1647 (patch)
tree59ccf5dc3e2bce59a503bf5a9d01141de6c55b6f /app/models/commit.rb
parentcf200b64d8f4aa70a97b9d1b672a93e813587630 (diff)
downloadgitlab-ce-e9b5b10a454c0ca37cdf3abc1712ee391e9e1647.tar.gz
Skip per-commit validations which have already passed on another change/branch
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index a422a0995ff..01f4c58daa1 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -469,6 +469,10 @@ class Commit
!!merged_merge_request(user)
end
+ def cache_key
+ "commit:#{sha}"
+ end
+
private
def commit_reference(from, referable_commit_id, full: false)