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 Summary
ConstructorDescriptionPullRequestSCMRevision
(PullRequestSCMHead head, String baseHash, String pullHash) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
equivalent
(jenkins.scm.api.mixin.ChangeRequestSCMRevision<?> o) The commit hash of the base branch we are tracking.The commit hash of the head of the pull request branch.The commit hash of the head of the pull request branch.toString()
Methods inherited from class jenkins.scm.api.mixin.ChangeRequestSCMRevision
equals, getTarget, hashCode, isMerge
Methods inherited from class jenkins.scm.api.SCMRevision
getHead, isDeterministic
-
Constructor Details
-
PullRequestSCMRevision
public PullRequestSCMRevision(@NonNull PullRequestSCMHead head, @NonNull String baseHash, @NonNull String pullHash)
-
-
Method Details
-
getBaseHash
The commit hash of the base branch we are tracking. IfChangeRequestSCMHead2.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
The commit hash of the head of the pull request branch.- Returns:
- The commit hash of the head of the pull request branch
-
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 classjenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
-
_hashCode
public int _hashCode()- Specified by:
_hashCode
in classjenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
-
toString
- Overrides:
toString
in classjenkins.scm.api.SCMRevision
-