From cd51af1a991eaa5e16e3c6b94c89d90e20a5641f Mon Sep 17 00:00:00 2001 From: Tiago Botelho Date: Tue, 27 Dec 2016 12:44:24 +0000 Subject: adds events to services api deserialization --- app/models/project_services/pivotaltracker_service.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/models/project_services/pivotaltracker_service.rb') diff --git a/app/models/project_services/pivotaltracker_service.rb b/app/models/project_services/pivotaltracker_service.rb index 5301f9fa0ff..6e19cd8ddd3 100644 --- a/app/models/project_services/pivotaltracker_service.rb +++ b/app/models/project_services/pivotaltracker_service.rb @@ -14,7 +14,7 @@ class PivotaltrackerService < Service 'Project Management Software (Source Commits Endpoint)' end - def to_param + def self.to_param 'pivotaltracker' end @@ -34,10 +34,14 @@ class PivotaltrackerService < Service ] end - def supported_events + def self.supported_events %w(push) end + def self.event_names + self.supported_events.map { |event| "#{event}_events" } + end + def execute(data) return unless supported_events.include?(data[:object_kind]) return unless allowed_branch?(data[:ref]) -- cgit v1.2.1