Commit ffa75a49 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Remove stage parameter from send payload

parent 0b0a53ee
...@@ -19,6 +19,8 @@ module Ci ...@@ -19,6 +19,8 @@ module Ci
after_save :keep_around_commits after_save :keep_around_commits
delegate :stages, to: :statuses
# ref can't be HEAD or SHA, can only be branch/tag name # ref can't be HEAD or SHA, can only be branch/tag name
scope :latest_successful_for, ->(ref = default_branch) do scope :latest_successful_for, ->(ref = default_branch) do
where(ref: ref).success.order(id: :desc).limit(1) where(ref: ref).success.order(id: :desc).limit(1)
......
...@@ -895,6 +895,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do ...@@ -895,6 +895,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do
t.string "category", default: "common", null: false t.string "category", default: "common", null: false
t.boolean "default", default: false t.boolean "default", default: false
t.boolean "wiki_page_events", default: true t.boolean "wiki_page_events", default: true
t.boolean "pipeline_events", default: false, null: false
end end
add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree
...@@ -1098,6 +1099,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do ...@@ -1098,6 +1099,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do
t.boolean "build_events", default: false, null: false t.boolean "build_events", default: false, null: false
t.boolean "wiki_page_events", default: false, null: false t.boolean "wiki_page_events", default: false, null: false
t.string "token" t.string "token"
t.boolean "pipeline_events", default: false, null: false
end end
add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
......
...@@ -15,9 +15,6 @@ module Gitlab ...@@ -15,9 +15,6 @@ module Gitlab
end end
def hook_attrs(pipeline) def hook_attrs(pipeline)
first_pending_build = pipeline.builds.first_pending
config_processor = pipeline.config_processor unless pipeline.skip_ci?
{ {
id: pipeline.id, id: pipeline.id,
ref: pipeline.ref, ref: pipeline.ref,
...@@ -25,8 +22,7 @@ module Gitlab ...@@ -25,8 +22,7 @@ module Gitlab
sha: pipeline.sha, sha: pipeline.sha,
before_sha: pipeline.before_sha, before_sha: pipeline.before_sha,
status: pipeline.status, status: pipeline.status,
stage: first_pending_build.try(:stage), stages: pipeline.stages,
stages: config_processor.try(:stages),
created_at: pipeline.created_at, created_at: pipeline.created_at,
finished_at: pipeline.finished_at, finished_at: pipeline.finished_at,
duration: pipeline.duration duration: pipeline.duration
......
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