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