Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
00297b90aa
2 changed files with 13 additions and 0 deletions
|
@ -437,6 +437,7 @@ func (m *Manager) AfterAll(ctx context.Context, stage *core.Stage) error {
|
|||
Stages: m.Stages,
|
||||
Status: m.Status,
|
||||
Users: m.Users,
|
||||
Webhook: m.Webhook,
|
||||
}
|
||||
return t.do(ctx, stage)
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ type teardown struct {
|
|||
Status core.StatusService
|
||||
Stages core.StageStore
|
||||
Users core.UserStore
|
||||
Webhook core.WebhookSender
|
||||
}
|
||||
|
||||
func (t *teardown) do(ctx context.Context, stage *core.Stage) error {
|
||||
|
@ -167,6 +168,17 @@ func (t *teardown) do(ctx context.Context, stage *core.Stage) error {
|
|||
Warnln("manager: cannot publish build event")
|
||||
}
|
||||
|
||||
payload := &core.WebhookData{
|
||||
Event: core.WebhookEventBuild,
|
||||
Action: core.WebhookActionUpdated,
|
||||
Repo: repo,
|
||||
Build: build,
|
||||
}
|
||||
err = t.Webhook.Send(noContext, payload)
|
||||
if err != nil {
|
||||
logger.WithError(err).Warnln("manager: cannot send global webhook")
|
||||
}
|
||||
|
||||
user, err := t.Users.Find(noContext, repo.UserID)
|
||||
if err != nil {
|
||||
logger.WithError(err).
|
||||
|
|
Loading…
Reference in a new issue