Enhanced GitHub webhooks: support for secrets and for more events #1207
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.
Hi,
This PR enhances the support for GitHub's webhooks:
create
,delete
andpull_request
events in addition to thepush
events;/api/webhook-github
;/api/webhook-github
the endpoint/api/push-github
;The
create
anddelete
events are sent by GitHub when a reference (a tag, a branch) is created or deleted. This PR triggers an evaluation of every jobset that has an input of typegithub_refs
and value the GitHub repo in stake. Onpull_request
, it's the same thing expected thetype
of the input should begithubpulls
.For signed payloads, secrets should be added to
hydra.conf
(viaInclude
s). Each secret should be of the form below, where the keysowner
andrepo
are regular expressions that filters the repository for which the secretsecret
apply.Is this approach fine, or did you guys have another idea in mind for this?
If that looks fine, I can write more tests in
t/Hydra/Controller/API/checks.t
.