jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-67826] Directly expose full payload from triggered GitHub webhooks

Open
#1,384 0 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
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


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 2
  • imported: 2025-12-02

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.