[JENKINS-69146] GITScm polling starts jobs for PR builds despite specified branch
I'm experiencing a weird issue with GitHub Plugin when using the GitHub hook trigger for GITScm polling functionality. Specifically, I have a job which is supposed to run on each commit for our master branch(which is configured in the Branches to build field of the SCM section), but instead it gets triggered for pushes to any and all branches, despite the Job being configured clearly only for master.
The interesting part, is that when I look at the Polling Log I see:
[poll] Latest remote head revision on refs/heads/master is: ABC - already built by 13
Done. Took 1 sec
Changes found
As it states, it clearly sees that the master branch commit ABC has already been built by job 13, and yet, it then says that Changes found, and starts a #14 master branch build for the same commit that already was built. And when I do check the Changes section, it's empty:

This behavior makes no sense.
This isn't something I've seen with other builds using the GITScm polling function, and I'm speculating, but I think the issue is due to also a Multibranch pipeline existing for the same repository, and the GitHub Webhook being configured like this:

I'm not sure though.
Originally reported by always_fail, imported from: GITScm polling starts jobs for PR builds despite specified branch
- status: Open
- priority: Major
- component(s): git-plugin, github-plugin
- label(s): github, polling, polling-scm, scm, webhook
- resolution: Unresolved
- votes: 2
- watchers: 3
- imported: 2025-12-02
Raw content of original issue
I'm experiencing a weird issue with GitHub Plugin when using the GitHub hook trigger for GITScm polling functionality. Specifically, I have a job which is supposed to run on each commit for our master branch(which is configured in the Branches to build field of the SCM section), but instead it gets triggered for pushes to any and all branches, despite the Job being configured clearly only for master.
The interesting part, is that when I look at the Polling Log I see:
[poll] Latest remote head revision on refs/heads/master is: ABC - already built by 13 Done. Took 1 sec Changes found
As it states, it clearly sees that the master branch commit ABC has already been built by job 13, and yet, it then says that Changes found, and starts a #14 master branch build for the same commit that already was built. And when I do check the Changes section, it's empty:
This behavior makes no sense.
This isn't something I've seen with other builds using the GITScm polling function, and I'm speculating, but I think the issue is due to also a Multibranch pipeline existing for the same repository, and the GitHub Webhook being configured like this:
I'm not sure though.
- environment:
2.361
hari_jenkins:
- Original comment link
Raw content of original comment:
I am also facing similar type of issue. Pipeline is configured to build whenever a new tag is released. But pipeline is triggered multiple times for a same tag.
I am also facing similar type of issue. Pipeline is configured to build whenever a new tag is released. But pipeline is triggered multiple times for a same tag.
bpopu:
- Original comment link
Raw content of original comment:
I am facing this same issue. Have you found any workarounds for this issue?
I am facing this same issue. Have you found any workarounds for this issue?