See INFRA-1633 for a real use-case on ci.jenkins.io. Some pull requests are stale OR contain no content to rebuild, and it does not make sense to run CI against them and to consume resources each time builds are retriggered.

      I suggest adding a new trait which allows skipping pull requests if they are labeled by "skip-ci" or such labels

          [JENKINS-58939] Allow skipping pull requests by labels

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to INFRA-1633 [ INFRA-1633 ]

          Jesse Glick added a comment -

          This can be done in a separate plugin implementing a BranchBuildStrategy, I think. Perhaps better done in scm-trait-commit-skip-plugin.

          Jesse Glick added a comment - This can be done in a separate plugin implementing a BranchBuildStrategy , I think. Perhaps better done in scm-trait-commit-skip-plugin .

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/github-branch-source-plugin/pull/239  

          Steven Foster added a comment -

          I wrote a plugin to do this for myself a long time ago, never got to publishing it because I couldn't hook up an event subscriber thing for github pull request label events. My use case was for opting-in pull requets based on label but I think I wrote the excluding case as well. I can throw what I have on github tomorrow.

          https://issues.jenkins-ci.org/browse/JENKINS-50323 somewhat related.

          Steven Foster added a comment - I wrote a plugin to do this for myself a long time ago, never got to publishing it because I couldn't hook up an event subscriber thing for github pull request label events. My use case was for opting-in pull requets based on label but I think I wrote the excluding case as well. I can throw what I have on github tomorrow. https://issues.jenkins-ci.org/browse/JENKINS-50323 somewhat related.
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-50323 [ JENKINS-50323 ]
          Oleg Nenashev made changes -
          Link New: This issue is blocking INFRA-2404 [ INFRA-2404 ]

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: