jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-67826] Directly expose full payload from triggered GitHub webhooks
- Dominant language
- Java
- Stars
- 217
- Forks
- 398
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
When constructing a Jenkins pipeline that will run both on a branch push and pull requests events, there is the situation where a closed pull request (such as from being merged), will fire off a GitHub Pull Request payload, yet env.CHANGE_ID will be empty since that PR id is no longer active. This causes extraneous jobs to be created, and it would be great if there was a way to parse the actual payload that Jenkins receives from GitHub without alterations or bubbling up select attributes in predetermined env variables. I just want the payload, and I don't want to mess with the Generic Webhook Plugin.
Any feedback or suggestions would be greatly appreciated. This has been an on-going issue at my place of employment for ~3 years now and handling this has always been a dreadful experience.
---
Originally reported by jriojas, imported from: Directly expose full payload from triggered GitHub webhooks
Raw content of original issue
When constructing a Jenkins pipeline that will run both on a branch push and pull requests events, there is the situation where a closed pull request (such as from being merged), will fire off a GitHub Pull Request payload, yet env.CHANGE_ID will be empty since that PR id is no longer active. This causes extraneous jobs to be created, and it would be great if there was a way to parse the actual payload that Jenkins receives from GitHub without alterations or bubbling up select attributes in predetermined env variables. I just want the payload, and I don't want to mess with the Generic Webhook Plugin.
Any feedback or suggestions would be greatly appreciated. This has been an on-going issue at my place of employment for ~3 years now and handling this has always been a dreadful experience.
Contributor guide
Assessment
This issue has not been assessed yet.