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

feat(triggers): add action field to git triggers context #693

Merged
merged 2 commits into from
Oct 31, 2019

Conversation

ivanphdz
Copy link
Contributor

@ivanphdz ivanphdz commented Oct 30, 2019

When dealing with webhook git triggers the event of the webhook does not reach the pipeline contexts. This PR makes this event available in the contexts of the pipeline execution.

This should no affect the current conditional for matching pipelines (source, project, slug, branch), it is just informative like the hash field.

For example: allowing only github events where someone open/close a pull request using check preconditions, or if there is github push event follow a different branch in the pipeline, instead of one for pull request events.

For bitbucket server I used the header X-Event-Key

For bitbucket cloud I used the header X-Event-Key

For gitlab I used the field in the payload named object_kind

For github at the moment only supports push and PR, so I used the field named action of the payload.

related to spinnaker/orca#3269

@cfieber cfieber merged commit e9e72b0 into spinnaker:master Oct 31, 2019
cfieber pushed a commit to spinnaker/orca that referenced this pull request Nov 1, 2019
When dealing with webhook git triggers the event of the webhook does not reach the pipeline contexts. This PR makes this event available in the contexts of the pipeline execution.

This should no affect the current conditional for matching pipelines (source, project, slug, branch), it is just informative like the hash field.

For example: allow only github events where someone open/close a pull request using check preconditions, or if there is github push event follow a different branch in the pipeline, instead of one for pull request events.

For bitbucket server I used the header X-Event-Key

For bitbucket cloud I used the header X-Event-Key

For gitlab I used the field in the payload named object_kind

For github at the moment only supports push and PR, so I used the field named action of the payload.

related to spinnaker/echo#693
sergiopena pushed a commit to sergiopena/orca that referenced this pull request Dec 13, 2019
)

When dealing with webhook git triggers the event of the webhook does not reach the pipeline contexts. This PR makes this event available in the contexts of the pipeline execution.

This should no affect the current conditional for matching pipelines (source, project, slug, branch), it is just informative like the hash field.

For example: allow only github events where someone open/close a pull request using check preconditions, or if there is github push event follow a different branch in the pipeline, instead of one for pull request events.

For bitbucket server I used the header X-Event-Key

For bitbucket cloud I used the header X-Event-Key

For gitlab I used the field in the payload named object_kind

For github at the moment only supports push and PR, so I used the field named action of the payload.

related to spinnaker/echo#693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants