jenkinsci / jenkinsci/git-plugin

[JENKINS-36195] Pipeline polling ignores special polling rules

Open
#2,891 80 comments 0 reactions 0 assignees View on GitHub
component:git-plugin component:workflow-job-plugin component:workflow-scm-step-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

The git plugin currently offers several special rules on polling:



  1. Polling ignores commits from certain users

  2. Polling ignores commits from certain paths (Included/Excluded regions)

  3. Polling ignores commits with certain messages

  4. Branch specifier

For example:

checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'UserExclusion', excludedUsers: 'dvader'], [$class: 'PathRestriction', excludedRegions: 'One/.*', includedRegions: 'Test/.*'], [$class: 'MessageExclusion', excludedMessage: '.\\[maven-release-plugin
].
']], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId: '...', url: 'ssh://git@​bitbucket.org/test.git']]])

If a commit is committed to bitbucket.org/test.git, regardless of the user, location, branch or message, the step that includes the checkout will be run.

Similar issue has been reported in:


---
Originally reported by dvader, imported from: Pipeline polling ignores special polling rules


  • status: Open
  • priority: Major
  • component(s): git-plugin, workflow-job-plugin, workflow-scm-step-plugin
  • resolution: Unresolved
  • votes: 108
  • watchers: 109
  • imported: 2025-12-02

Raw content of original issue

The git plugin currently offers several special rules on polling:



  1. Polling ignores commits from certain users

  2. Polling ignores commits from certain paths (Included/Excluded regions)

  3. Polling ignores commits with certain messages

  4. Branch specifier

For example:
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'UserExclusion', excludedUsers: 'dvader'], [$class: 'PathRestriction', excludedRegions: 'One/.*', includedRegions: 'Test/.*'], [$class: 'MessageExclusion', excludedMessage: '.\\[maven-release-plugin
].
']], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId: '...', url: 'ssh://git@bitbucket.org/test.git']]])

If a commit is committed to bitbucket.org/test.git, regardless of the user, location, branch or message, the step that includes the checkout will be run.

Similar issue has been reported in:



environment

```
Jenkins LTS Latest

Windows 7 x64
```

6 attachments

- [image-2017-07-18-16-03-09-364.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/38935/image-2017-07-18-16-03-09-364.png)
> ![image-2017-07-18-16-03-09-364.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/38935/image-2017-07-18-16-03-09-364.png)
- [image-2018-06-28-18-09-30-343.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43243/image-2018-06-28-18-09-30-343.png)
> ![image-2018-06-28-18-09-30-343.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43243/image-2018-06-28-18-09-30-343.png)
- [image-2018-06-29-14-45-17-341.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43260/image-2018-06-29-14-45-17-341.png)
> ![image-2018-06-29-14-45-17-341.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43260/image-2018-06-29-14-45-17-341.png)
- [image-2018-06-29-15-36-13-977.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43261/image-2018-06-29-15-36-13-977.png)
> ![image-2018-06-29-15-36-13-977.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43261/image-2018-06-29-15-36-13-977.png)
- [pipeline-with-userexclusion-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43589/pipeline-with-userexclusion-working.png)
> ![pipeline-with-userexclusion-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43589/pipeline-with-userexclusion-working.png)
- [pipeline-without-userexclusion-not-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43588/pipeline-without-userexclusion-not-working.png)
> ![pipeline-without-userexclusion-not-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43588/pipeline-without-userexclusion-not-working.png)

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.