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

Allow SCMSource implementations to expose merge and origin of change request heads

      Acceptance criteria

      • Change requests as implemented in the SCM API expose to consumer code
        • the merge strategy
        • the origin
        • the origin branch name
      • In order to retain binary compatibility, some of this information may only be available / correct when the corresponding SCM API implementation plugin has been updated.
      • The Branch API plugin has been updated with tests of any new significant code paths relating to branch discovery
      • The Branch API plugin exposes the origin and origin branch name when such information is provided by the corresponding SCM API implementation plugin.
      • The GitHub Branch Source plugin has been updated to expose the new change request information.
        • Upgrading from the 2.x.y series of the GitHub Branch Source shall not trigger a rebuild storm.
        • Upgrading from the 1.x series of the GitHub Branch Source should make best effort not to trigger a rebuild storm.
      • The Bitbucket Branch Source plugin has been updated to expose the new change request information
        • Upgrading from the 2.x.y series of the Bitbucket Branch Source shall not trigger a rebuild storm.
        • Upgrading from the 1.x series of the Bitbucket Branch Source should make best effort not to trigger a rebuild storm.
      • The SCM API's implementer guide has been updated to reflect the new recommendations for implementing change requests.

          [JENKINS-43433] Allow SCMSource implementations to expose merge and origin of change request heads

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          docs/implementation.adoc
          pom.xml
          src/main/java/jenkins/scm/api/SCMHead.java
          src/main/java/jenkins/scm/api/SCMHeadOrigin.java
          src/main/java/jenkins/scm/api/mixin/ChangeRequestCheckoutStrategy.java
          src/main/java/jenkins/scm/api/mixin/ChangeRequestSCMHead2.java
          src/main/java/jenkins/scm/api/mixin/ChangeRequestSCMRevision.java
          src/main/java/jenkins/scm/api/mixin/SCMHeadMixin.java
          src/test/java/jenkins/scm/impl/mock/MockChangeRequestFlags.java
          src/test/java/jenkins/scm/impl/mock/MockChangeRequestSCMHead.java
          src/test/java/jenkins/scm/impl/mock/MockChangeRequestSCMRevision.java
          src/test/java/jenkins/scm/impl/mock/MockRepositoryFlags.java
          src/test/java/jenkins/scm/impl/mock/MockSCM.java
          src/test/java/jenkins/scm/impl/mock/MockSCMController.java
          src/test/java/jenkins/scm/impl/mock/MockSCMSource.java
          src/test/resources/jenkins/scm/impl/mock/MockSCMSource/config-detail.jelly
          http://jenkins-ci.org/commit/scm-api-plugin/5fe2558cad4e052267c6a2826602ca2910afb32d
          Log:
          Merge pull request #35 from stephenc/jenkins-43433

          JENKINS-43433 Allow SCMSource implementations to expose merge and origin of change request heads

          Compare: https://github.com/jenkinsci/scm-api-plugin/compare/5631932f5cdf...5fe2558cad4e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: docs/implementation.adoc pom.xml src/main/java/jenkins/scm/api/SCMHead.java src/main/java/jenkins/scm/api/SCMHeadOrigin.java src/main/java/jenkins/scm/api/mixin/ChangeRequestCheckoutStrategy.java src/main/java/jenkins/scm/api/mixin/ChangeRequestSCMHead2.java src/main/java/jenkins/scm/api/mixin/ChangeRequestSCMRevision.java src/main/java/jenkins/scm/api/mixin/SCMHeadMixin.java src/test/java/jenkins/scm/impl/mock/MockChangeRequestFlags.java src/test/java/jenkins/scm/impl/mock/MockChangeRequestSCMHead.java src/test/java/jenkins/scm/impl/mock/MockChangeRequestSCMRevision.java src/test/java/jenkins/scm/impl/mock/MockRepositoryFlags.java src/test/java/jenkins/scm/impl/mock/MockSCM.java src/test/java/jenkins/scm/impl/mock/MockSCMController.java src/test/java/jenkins/scm/impl/mock/MockSCMSource.java src/test/resources/jenkins/scm/impl/mock/MockSCMSource/config-detail.jelly http://jenkins-ci.org/commit/scm-api-plugin/5fe2558cad4e052267c6a2826602ca2910afb32d Log: Merge pull request #35 from stephenc/jenkins-43433 JENKINS-43433 Allow SCMSource implementations to expose merge and origin of change request heads Compare: https://github.com/jenkinsci/scm-api-plugin/compare/5631932f5cdf...5fe2558cad4e

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/test/java/integration/EventsTest.java
          http://jenkins-ci.org/commit/branch-api-plugin/a4d62a858b5925e38d4a965ce82b9f711e7130ec
          Log:
          JENKINS-43433 Add more tests now that we can do merge PRs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/a4d62a858b5925e38d4a965ce82b9f711e7130ec Log: JENKINS-43433 Add more tests now that we can do merge PRs

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/test/java/integration/EventsTest.java
          http://jenkins-ci.org/commit/branch-api-plugin/fd2799dc5af738c2646a99e99e4a333065258d52
          Log:
          JENKINS-43433 Pick up SCM API refactoring

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/fd2799dc5af738c2646a99e99e4a333065258d52 Log: JENKINS-43433 Pick up SCM API refactoring

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/jenkins/branch/BranchNameContributor.java
          http://jenkins-ci.org/commit/branch-api-plugin/6c5953a1bcc0cb900d53022f7916a2a14e76c81c
          Log:
          JENKINS-43433 Update to latest -SNAPSHOT

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/BranchNameContributor.java http://jenkins-ci.org/commit/branch-api-plugin/6c5953a1bcc0cb900d53022f7916a2a14e76c81c Log: JENKINS-43433 Update to latest -SNAPSHOT

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/test/java/jenkins/branch/BranchNameContributorTest.java
          http://jenkins-ci.org/commit/branch-api-plugin/3300e7022c2aaedcca32b9d78fae7fad1cdd69b6
          Log:
          JENKINS-43433 Add a test for BranchNameContributor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/jenkins/branch/BranchNameContributorTest.java http://jenkins-ci.org/commit/branch-api-plugin/3300e7022c2aaedcca32b9d78fae7fad1cdd69b6 Log: JENKINS-43433 Add a test for BranchNameContributor

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/test/java/integration/EventsTest.java
          http://jenkins-ci.org/commit/branch-api-plugin/809ea046b98d070bc0d1004b95ddf3c37fda0c9f
          Log:
          JENKINS-43433 No need to differentiate between MERGE and REBASE

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/809ea046b98d070bc0d1004b95ddf3c37fda0c9f Log: JENKINS-43433 No need to differentiate between MERGE and REBASE

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
          src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
          src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMRevision.java
          src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSource.java
          src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceTest.java
          http://jenkins-ci.org/commit/github-branch-source-plugin/d8fc1a8b42495a918576f6688442744fa1c4d6e5
          Log:
          JENKINS-43433 Adapt to new API

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMRevision.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSource.java src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceTest.java http://jenkins-ci.org/commit/github-branch-source-plugin/d8fc1a8b42495a918576f6688442744fa1c4d6e5 Log: JENKINS-43433 Adapt to new API

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
          http://jenkins-ci.org/commit/github-branch-source-plugin/8125cbf0c60b859015654bddf7d4a051380ff301
          Log:
          JENKINS-43433 Update to latest -SNAPSHOT

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java http://jenkins-ci.org/commit/github-branch-source-plugin/8125cbf0c60b859015654bddf7d4a051380ff301 Log: JENKINS-43433 Update to latest -SNAPSHOT

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          http://jenkins-ci.org/commit/github-branch-source-plugin/f695f9f2a1682f7cd597ca716fc5b4ca0e914969
          Log:
          JENKINS-43433 Pick up SCM API -SNAPSHOT

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml http://jenkins-ci.org/commit/github-branch-source-plugin/f695f9f2a1682f7cd597ca716fc5b4ca0e914969 Log: JENKINS-43433 Pick up SCM API -SNAPSHOT

          James Dumay added a comment -

          Seems this has been merged.

          James Dumay added a comment - Seems this has been merged.

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: