Class PullRequestSCMRevision

java.lang.Object
jenkins.scm.api.SCMRevision
jenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision
All Implemented Interfaces:
Serializable

public class PullRequestSCMRevision extends jenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
Revision of a pull request.
See Also:
  • Constructor Details

  • Method Details

    • getBaseHash

      @NonNull public String getBaseHash()
      The commit hash of the base branch we are tracking. If ChangeRequestSCMHead2.getCheckoutStrategy() ChangeRequestCheckoutStrategy.MERGE, this would be the current head of the base branch. Otherwise it would be the PR’s .base.sha, the common ancestor of the PR branch and the base branch.
      Returns:
      the commit hash of the base branch we are tracking.
    • getPullHash

      @Exported @NonNull public String getPullHash()
      The commit hash of the head of the pull request branch.
      Returns:
      The commit hash of the head of the pull request branch
    • getMergeHash

      @CheckForNull public String getMergeHash()
      The commit hash of the head of the pull request branch.
      Returns:
      The commit hash of the head of the pull request branch
    • equivalent

      public boolean equivalent(jenkins.scm.api.mixin.ChangeRequestSCMRevision<?> o)
      Specified by:
      equivalent in class jenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
    • _hashCode

      public int _hashCode()
      Specified by:
      _hashCode in class jenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
    • toString

      public String toString()
      Overrides:
      toString in class jenkins.scm.api.SCMRevision