summaryrefslogtreecommitdiff
path: root/app/models/push_event.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/models/push_event.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/models/push_event.rb')
-rw-r--r--app/models/push_event.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/push_event.rb b/app/models/push_event.rb
index 5cab686f20b..0f626cb618e 100644
--- a/app/models/push_event.rb
+++ b/app/models/push_event.rb
@@ -68,7 +68,7 @@ class PushEvent < Event
end
def self.sti_name
- PUSHED
+ actions[:pushed]
end
def push_action?
@@ -111,7 +111,7 @@ class PushEvent < Event
end
def validate_push_action
- return if action == PUSHED
+ return if pushed_action?
errors.add(:action, "the action #{action.inspect} is not valid")
end