-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a couple of issues with webhooks. Upon "connecting" a workspace with a repo, OTF checks to see if a webhook is already configured for the repo, and if so, it checks for any discrepancies in its configuration, and if there are discrepancies then it updates the webhook configuration to bring into sync with what OTF has. However, that code had a bug where even though the configuration was ok it would flag up a discrepancy and so the webhook would always be updated. Secondly, the Github client code for updating a webhook would neglect to set all the required parameters. Specifically, it neglected to set the "content-type" of the webhook payload, and thus Github would revert to its default, `form`, whereas OTF requires it to be set to `json`. This fix does two things: 1. Don't check for discrepancies in webhook config; instead **always** update the webhook whenever a workspace (or module) is connected to a repo. This also ensures any out-of-band alterations to the webhook configuration on the repo are reverted. 2. Fix the Github client code to set the content-type when updating a webhook.
- Loading branch information
Showing
16 changed files
with
419 additions
and
260 deletions.
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
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
Oops, something went wrong.