Skip to content

The plugin triggers builds for PRs with same number in different repositories #65

@CiocoiuRadu

Description

@CiocoiuRadu

Jenkins and plugins versions report

Environment

Jenkins: 2.346.3
OS: Linux - 4.14.326-245.539.amzn2.x86_64
Java: 11.0.16 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

.....
branch-api:2.1071.v1a_188a_562481
git:4.14.3
git-client:3.13.1
github:1.34.5
github-api:1.303-400.v35c2d8258028
github-branch-source:1696.v3a_7603564d04
github-checks:1.0.19
github-pr-comment-build:96.v9ff13b69dd66
......

What Operating System are you using (both controller, and any agents involved in the problem)?

OS: Linux - 4.14.326-245.539.amzn2.x86_64

Reproduction steps

  1. Create Github organization with several repositories containing jenkinsfiles
  2. Either configure organization webhook or 1 repository webhook with "Issue Comments" Event
  3. Create and configure Jenkins "Organization Folder" job
  4. Open a pull request in multiple repositories, so that multiple repositories have the same PR number (e.g. pull request Support GH organization folders #1 on multiple repos)
  5. Trigger a scan in the Jenkins organization to detect and create jobs for these repositories
  6. Post a comment in one of these repositories with the keyword configured in the plugin

Expected Results

The expected result would be that a build is triggered only in the repository in which the comment was posted

Actual Results

Builds are triggered for every "repository" in Jenkins that matches the PR number which sent the Github event
image

In the image above, a comment with the expected keyword was posted on first PR in the sw-prj-repo3 repository

Anything else?

Here is a log snippet:
image

Is this the intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions