Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56111

closing a PR does not trigger a pipeline build


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor

      I use the GitHub Branch Source Plugin for my multi-branch pipeline. In my use case I want to do some cleanup steps when the pr is closed, e.g. deleting PR related cache files. My current understanding is that a build should be triggered if the state of the PR is changed including a close event. But for me this doesn't work. When reopen the PR a build will be triggered correctly identifying the state as being reopened. In the configuration I couldn't find any specific trigger for closing a PR.

      To reproduce:

      Make a new PR from fork or origin -> pipeline build is triggered

      Close PR -> nothing happens [but it should notify something?]

      Reopen PR -> pipeline build is triggered


      My workaround would be to regularly fetch all open PRs from GitHub and compare with the cache directories (PR specific) to manually invoke the cleanup, but it would be much cleaner to keep the logic within the scope of the respective PR.

      I am probably just missing something here but any help is really appreciated.

            Unassigned Unassigned
            rahn Rene Rahn
            1 Vote for this issue
            4 Start watching this issue