Why are builds getting triggered when PR is closed?

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We're setting up Jenkins to automatically build when new PRs are opened or updated. This is working great, but we've noticed that builds also happen when PRs are closed.

       

      Is this something we can disable? If a developer closes a PR, there's no need for us to waste any time doing a build.

       

      I believe this is the relevant code of the `github-branch-source-plugin` plugin: https://github.com/jenkinsci/github-branch-source-plugin/blob/923184ce70fc84252937b8d08872f666efcc288b/src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestGHEventSubscriber.java#L146-L154. Here you can see a `SCMEvent.Type.REMOVED` event getting fired. It's unclear to me what actually reacts to that event and triggers a build, though.

       

      Any help would be super appreciated. Thanks!

            Assignee:
            Unassigned
            Reporter:
            Jeremy Fleischman
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: