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

Multiple refspecs should be matched using OR, not AND


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None

      I'm using the GH plugin and the GH PR builder plugin together since I want to build PRs before they are merged but I also want to build the master branch of my projectafter a PR was merged into it. Consequently, I set the Refspec field of the job to

      +refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*

      The first refspec is for the PR builder plugin, the second one for the GH plugin. Unfortunately, the git plugin somehow requires that a remote head with changes matches both refspecs, not just one of them. Since it is impossible that a head matches both refspecs, it rejects all pushes to the master branch and doesn't trigger a build. This happens regardless of whether I use polling or a web hook. Will file PR shortly.

            ndeloof Nicolas De Loof
            hannes_ucsc Hannes Schmidt
            0 Vote for this issue
            3 Start watching this issue