-
Notifications
You must be signed in to change notification settings - Fork 148
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
GitHub - Check for an existing webhook when subscribing to a repo #378
Comments
One thing to consider while implementing this is which token to use for fetching the information about what webhook to use. |
Requires #456 to be merged first. |
The token use to check check the webhook should be the one from the user executing the command. It them doesn't have the appropriate permissions, the check doesn't fail, it just isn't performed. |
@hanzei just wanted to check will it be okey if we return the message when the subscription is successful and there is no webhook for repo/owner
|
@hanzei have implemented this feature in this way , let me know if you have any suggestion from your side |
#466 can be used as a starting point. This ticket is only about warning the admin that the webhook is missing. |
…bing' (#28) * [MI-2935]:Fixed issue mattermost#378 'Check for webhook while subscribing' * [MI-2935]:Fixed self review comments * [MI-2935]:Updated the message * [MI-2935]:Fixed review comments * [MI-2935]:Fixed lint errors * [MI-2935]:Fixed review comments
When a user create a subscription to a repo the plugin should check the repo (or parent Organization for Enterprise) to see if a webhook is in place to deliver the events
If no webhook is found on the GitHub side, an ephemeral post should occur to remind the user that a webhook must be set up. It can then post the url that must be used to deliver the events.
Note that this functionality is already implemented for GitLab and some of this implementation may be salvageable. cc @DHaussermann
The text was updated successfully, but these errors were encountered: