jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-53624] Branch indexing schedules builds for other branches and repos

Open
#1,205 2 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin component:github-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

Hello,

I'm having a problem that seems pretty much identical to this one for the Gitlab Branch Source Plugin: https://github.com/Argelbargel/gitlab-branch-source-plugin/issues/45

I'm assuming the root issue is very similar, if not identical. On Github webhook triggers a number of branch indexing jobs are kicked off for builds in the current repo, as well as for other repos. I'm using BlueOcean.

Questions:

1) Is this a known issue?

2) Is there a workaround?

3) As a possible means to come up with a workaround, are there any variables I can latch onto that would give me visibility into the context so in my Jenkinsfile pipeline I can do the following on branch indexing:

```
currentBuild.result = 'NOT_BUILT'
error('Aborting build triggered by scan process')
```

This was a suggestion in the above Gitlab thread, only I'm not seeing an equivalent to `gitlabActionType` in the list of environment variables (output with "env"). It would be great if I could ignore builds from branch indexing as a short term workaround without disabling the webhooks entirely.

---
Originally reported by joeauty, imported from: Branch indexing schedules builds for other branches and repos


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

Raw content of original issue

Hello,

I'm having a problem that seems pretty much identical to this one for the Gitlab Branch Source Plugin: https://github.com/Argelbargel/gitlab-branch-source-plugin/issues/45

I'm assuming the root issue is very similar, if not identical. On Github webhook triggers a number of branch indexing jobs are kicked off for builds in the current repo, as well as for other repos. I'm using BlueOcean.

Questions:

1) Is this a known issue?

2) Is there a workaround?

3) As a possible means to come up with a workaround, are there any variables I can latch onto that would give me visibility into the context so in my Jenkinsfile pipeline I can do the following on branch indexing:



currentBuild.result = 'NOT_BUILT'

error('Aborting build triggered by scan process')


This was a suggestion in the above Gitlab thread, only I'm not seeing an equivalent to `gitlabActionType` in the list of environment variables (output with "env"). It would be great if I could ignore builds from branch indexing as a short term workaround without disabling the webhooks entirely.

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.