jenkinsci / jenkinsci/git-plugin

[JENKINS-18212] Branches get triggered for polling when we don't want them to

Open
#2,290 7 comments 0 reactions 0 assignees View on GitHub
component:git-plugin enhancement imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

So what I am hoping to do is to prevent polling from happening on any branch besides the one that was changed. I thought by having the "branches=branch2" for example would trigger the plugin to only schedule a polling of that branch. The reason for this functionality is that we need certain users to be able to commit without triggering a build such as admin work/upper level scripts which don't impact our product. Even if I abort a build the next time someone pushes, the force polling will build that branch even though the push wasn't for that specific branch.

Below you can see the output of what command we push, I would expect branch2 to kick off a poll but no other branch to do that.

remote: branch=branch2, user=peter_kline, repo=flt/root

remote: Running command: curl http://jenkins:8080/git/notifyCommit?url=git@​gitserver:flt/root.git&branches=branch2

remote: Scheduled polling of branch1

remote: Scheduled polling of branch2

remote: Scheduled polling of branch3

remote: Scheduled polling of branch4

remote: Scheduled polling of branch5

remote: Scheduled polling of branch6

remote: Scheduled polling of branch7

remote: Scheduled polling of branch8

remote: Scheduled polling of branch9

remote: Scheduled polling of branch10

remote: Scheduled polling of branch11

remote: Scheduled polling of branch12

remote: Scheduled polling of branch13

remote: Scheduled polling of branch14

To git@​gitserver:flt/root.git

9607b14..1daed8c branch2 -> branch2

---
Originally reported by peter_kline, imported from: Branches get triggered for polling when we don't want them to


  • status: Open
  • priority: Critical
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 3
  • imported: 2025-12-02

Raw content of original issue

So what I am hoping to do is to prevent polling from happening on any branch besides the one that was changed. I thought by having the "branches=branch2" for example would trigger the plugin to only schedule a polling of that branch. The reason for this functionality is that we need certain users to be able to commit without triggering a build such as admin work/upper level scripts which don't impact our product. Even if I abort a build the next time someone pushes, the force polling will build that branch even though the push wasn't for that specific branch.

Below you can see the output of what command we push, I would expect branch2 to kick off a poll but no other branch to do that.


remote: branch=branch2, user=peter_kline, repo=flt/root

remote: Running command: curl http://jenkins:8080/git/notifyCommit?url=git@gitserver:flt/root.git&branches=branch2

remote: Scheduled polling of branch1
remote: Scheduled polling of branch2
remote: Scheduled polling of branch3
remote: Scheduled polling of branch4
remote: Scheduled polling of branch5
remote: Scheduled polling of branch6
remote: Scheduled polling of branch7
remote: Scheduled polling of branch8
remote: Scheduled polling of branch9
remote: Scheduled polling of branch10
remote: Scheduled polling of branch11
remote: Scheduled polling of branch12
remote: Scheduled polling of branch13
remote: Scheduled polling of branch14
To git@gitserver:flt/root.git
9607b14..1daed8c branch2 -> branch2



environment

```
Jenkins Server: 1.5.10

Git plugin: 1.3.0
```

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.