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

PR matching regex can never match strategies

XMLWordPrintable

      https://github.com/jenkinsci/github-branch-source-plugin/blob/d60cc7617ee9ad56fd3ea3a3c3ad2569dc07c827/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java#L1163

      the regex "^PR-(
      d+)(.)?$"
      includes {} in the second matching group which means PR-11-HEAD will never match the strategy of HEAD as the second matching group includes the {}. Just need to do something like "^PR(
      d+)(:?-(.
      ))?$" (if I can remember my regex for non-matching groups correctly)

            rsandell rsandell
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: