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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PullRequestSCMRevision(PullRequestSCMHead head, String baseHash, String pullHash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
_hashCode()
boolean
equivalent(jenkins.scm.api.mixin.ChangeRequestSCMRevision<?> o)
String
getBaseHash()
The commit hash of the base branch we are tracking.String
getMergeHash()
The commit hash of the head of the pull request branch.String
getPullHash()
The commit hash of the head of the pull request branch.String
toString()
-
-
-
Constructor Detail
-
PullRequestSCMRevision
public PullRequestSCMRevision(@NonNull PullRequestSCMHead head, @NonNull String baseHash, @NonNull String pullHash)
-
-
Method Detail
-
getBaseHash
@NonNull public String 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
@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 classjenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
-
_hashCode
public int _hashCode()
- Specified by:
_hashCode
in classjenkins.scm.api.mixin.ChangeRequestSCMRevision<PullRequestSCMHead>
-
toString
public String toString()
- Overrides:
toString
in classjenkins.scm.api.SCMRevision
-
-