Conversation
* Update GitHubSCMSourceContext.java * Update GitHubSCMSourceContext.java * Update PullRequestGHEventSubscriber.java * Update Messages.properties * Create IgnoreEditedPullRequestFilterTrait.java * Create IgnoreEditedPullRequestFilterTraitTest.java
|
FTR:
@jmasalma have you reproduced this issue yourself before opening this pull request? |
@lemeurherve Yes, we reproduced this ourselves. When a PR description is edited (with no new commit), GitHub fires a pull_request event with action: edited, which the plugin handles as an SCMEvent.Type.UPDATED event - triggering a new build against the same commit SHA as the previous run. We confirmed this by inspecting the BranchEventCause on the triggered build, which shows "Pull request #N event" (the fallthrough description for edited) rather than "Pull request #N updated" (which is only set for synchronize). The webhook payload from GitHub confirmed the trigger: We're running Jenkins GitHub Branch Source Plugin 1967.1970.vd86979736546. The behavior is reproducible but not 100% consistent - it only triggers when no build is already queued or running for that PR at the time of the edit, which explains why it doesn't always happen. |
|
Thanks. Asked because I couldn't reproduce on ci.jenkins.io running Jenkins 2.568.3 (latest LTS) nor on infra.ci.jenkins.io running Jenkins 2.583 (latest Weekly), both using GitHub Branch Source Plugin 1983.vfa_27ed961853. |
|
Reproduced with following Webhook payload shows: Jenkins 2.555.3 with GitHub Branch Source 1967.1970.vd86979736546 installed |
|
@MarkEWaite / @jglick, Sorry to bother you, would you be able to take a look at this? The issue reproduces on GitHub Enterprise Server 3.19.10 with Jenkins 2.555.3. Happy to provide any additional context. |
I'm not a maintainer of the plugin. I don't feel qualified to review the pull request. You can use the incremental build in your installation. That allows you to use the change immediately, without waiting for a release. |
Description
Add a new IgnoreEditedPullRequestFilterTrait that suppresses builds triggered by pull request edited webhook events (title or description changes). When this trait is enabled on a GitHub SCM source, editing a PR's title or description will no longer trigger a new build for the same commit.
See JENKINS-65978 / Issue 1361 and JENKINS-67888 / Issue 1385 for further information.
Submitter checklist
Reviewer checklist
Documentation changes
Users/aliases to notify
Relevant to anyone affected by JENKINS-65978 or JENKINS-67888.
Manual test instructions: