feat: Add plan webhook support - #5978
Conversation
Signed-off-by: hjk1996 <dunhill741@naver.com>
6b9da0f to
4a49034
Compare
|
|
||
| if err != nil { | ||
| return "", "", fmt.Errorf("%s\n%s", err, strings.Join(outputs, "\n")) | ||
| } |
There was a problem hiding this comment.
It might be worth capturing any error that occurs here and emitting an error log.
| webhookSendErr := p.Webhooks.Send(ctx.Log, webhooks.EventResult{ Event: webhooks.ApplyEvent, | |
| Workspace: ctx.Workspace, | |
| User: ctx.User, | |
| Repo: ctx.Pull.BaseRepo, | |
| Pull: ctx.Pull, | |
| Success: err == nil, | |
| Directory: ctx.RepoRelDir, | |
| ProjectName: ctx.ProjectName, | |
| }) | |
| if webhookSendErr != nil { | |
| ctx.Log.Err("error sending apply webhook; %v", webhookSendErr) | |
| } | |
| if err != nil { | |
| return "", "", fmt.Errorf("%s\n%s", err, strings.Join(outputs, "\n")) | |
| } |
abborg
left a comment
There was a problem hiding this comment.
Webhook send failures could be emitted as logs, but as it's not currently done for the apply webhook, I don't see it as a blocker for this change.
Signed-off-by: hjk1996 <dunhill741@naver.com>
Signed-off-by: hjk1996 <dunhill741@naver.com>
|
Would be nice to have this feature merged at the soonest |
|
Really looking for this feature. |
|
This is a necessary feature. Our organization really needs notifications for Atlantis plans as well. |
|
This is one of the feature our org is looking for, are there any plans to merge this in next release ? |
what
why
To deliver plan results through the webhook pipeline, and to make webhook payloads/messages clearly identify which event triggered them.
tests
go test ./server/events/webhooks(passes)references