This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
feat: Support webhook url config key #564
Merged
+79
−1
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why providing a complete custom configuration for the Hooks API ?
This would allow a Zappr deployment where you could write just any endpoint and than your Zappr instance won't receive any data.
Therefore, not seeing any value here w/o opining up Zappr to potential problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for specific use cases where webhooks from the internet to internal systems (Zappr, CI, et.c) go through a single endpoint.
For example, in a case where Zappr is not accessible from the internet but a single endpoint, say
https://my-webhook-entry-point/zappr
is accessible to the internet and forwards requests (webhooks) internally to Zappr. Zappr should therefore sethttps://my-webhook-entry-point/zappr
as the webhook on Github and nothttps://zappr-internal-domain/api/hook
, sincehttps://zappr-internal-domain/api/hook
would not be reachable from the internet.Please let me know if you need more information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the explanation! This makes totally sense. Hopefully this week we can merge this PR. We are right now finishing our internal testing of the new feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing, now that I'm rereading it. In your case, wouldn't the setting be setup on the Github OAuth Apps page rather than here? This Hook_URL is for internal usage in Zappr, which in that case should be the internal Domain which the Loadbalancer will redirect to, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one on the Github Oauth Apps page is different, mostly used for web oauth flow (redirect URL). This one is set per github repo as part of setting up a webhook.
Since Zappr sets up the webhook as part of "activating" the approval check, it builds the webhook url from its own LB url, this config key allows us specify the webhook url Zappr should set for the repo.