Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support redelivering a webhook #459

Closed
jbrockopp opened this issue Dec 21, 2021 · 1 comment
Closed

support redelivering a webhook #459

jbrockopp opened this issue Dec 21, 2021 · 1 comment
Assignees
Labels
area/api Indicates a change to the API area/server Indicates a change to the server feature Indicates a new feature

Comments

@jbrockopp
Copy link
Contributor

jbrockopp commented Dec 21, 2021

Description

Earlier this year, GitHub introduced support for API functionality for webhooks:

https://github.blog/changelog/2021-06-30-webhook-deliveries-api/

We should add support to Vela to be able to redeliver a webhook:

https://docs.github.com/en/rest/reference/webhooks#redeliver-a-delivery-for-a-repository-webhook

This functionality could, and possibly should, be replicated from the existing logic used to restart a build:

https://go-vela.github.io/docs/reference/api/build/restart/
https://go-vela.github.io/docs/reference/cli/build/restart/
https://github.com/go-vela/server/blob/master/api/build.go#L745

Value

  • improve the user experience when a user needs to redeliver an existing webhook

This can happen for multiple reasons but to provide a quick example:

  • an admin of a repository from the source system enables that repository in Vela
  • this user becomes the "owner" of that repository in Vela
  • the user's account is deactivated or removed from the source system
  • anytime a build is triggered they'll receive a 403 Your account has been suspended error message

To resolve this issue, it often requires a user to go and change ownership of the repository in Vela

After they perform that action, they are forced to redeliver any webhooks that failed with the 403 error manually

Instead, I propose they be able to redeliver the failed webhook through the Vela system

Definition of Done

A user can trigger some interaction through Vela that initiates an API call to the source system to redeliver a webhook

Ideally this would include an API endpoint, CLI command, and button in UI that enable this functionality

Effort (Optional)

1 week

Impacted Personas (Optional)

everyone

@jbrockopp jbrockopp added feature Indicates a new feature area/api Indicates a change to the API area/server Indicates a change to the server labels Dec 21, 2021
@ecrupper ecrupper self-assigned this Mar 1, 2022
@ecrupper ecrupper added this to To do in 0.13.0 Release 1st week of March via automation Mar 1, 2022
@ecrupper ecrupper moved this from To do to In progress in 0.13.0 Release 1st week of March Mar 1, 2022
@ecrupper
Copy link
Contributor

ecrupper commented Mar 1, 2022

Started to take a look at this. It seems like Go-GitHub has yet to implement this on their end. I decided to open up a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates a change to the API area/server Indicates a change to the server feature Indicates a new feature
Projects
No open projects
Development

No branches or pull requests

3 participants