Commit f13567ed authored by Douwe Maan's avatar Douwe Maan
Browse files

Only execute GitlabCiService for push events.

parent a02d4c9fc46e
......@@ -22,8 +22,6 @@ class GitlabCiService < CiService
validates :project_url, presence: true, if: :activated?
validates :token, presence: true, if: :activated?
delegate :execute, to: :service_hook, prefix: nil
after_save :compose_service_hook, if: :activated?
def compose_service_hook
......@@ -32,6 +30,13 @@ def compose_service_hook
def execute(data)
object_kind = data[:object_kind]
return unless object_kind == "push"
def commit_status_path(sha)
project_url + "/commits/#{sha}/status.json?token=#{token}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment