diff options
Diffstat (limited to 'qa/qa/resource/project_web_hook.rb')
-rw-r--r-- | qa/qa/resource/project_web_hook.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/qa/qa/resource/project_web_hook.rb b/qa/qa/resource/project_web_hook.rb index 8b806c42030..86e662932e1 100644 --- a/qa/qa/resource/project_web_hook.rb +++ b/qa/qa/resource/project_web_hook.rb @@ -16,7 +16,11 @@ module QA confidential_note ].freeze - attr_accessor :url, :enable_ssl, :id + attr_accessor :url, :enable_ssl + + attribute :disabled_until + attribute :id + attribute :alert_status attribute :project do Project.fabricate_via_api! do |resource| @@ -33,19 +37,28 @@ module QA def initialize @id = nil @enable_ssl = false + @alert_status = nil @url = nil end + def fabricate_via_api! + resource_web_url = super + + @id = api_response[:id] + + resource_web_url + end + def resource_web_url(resource) "/project/#{project.name}/~/hooks/##{resource[:id]}/edit" end def api_get_path - "/projects/#{project.id}/hooks" + "#{api_post_path}/#{api_response[:id]}" end def api_post_path - api_get_path + "/projects/#{project.id}/hooks" end def api_post_body |