Package jenkins.scm.api.mixin
Interface ChangeRequestSCMHead2
- All Superinterfaces:
ChangeRequestSCMHead
,Comparable<SCMHead>
,SCMHeadMixin
,Serializable
Additional attributes of a
ChangeRequestSCMHead
that should have been in the original mixin but we are not
targeting Java 8 so we cannot add the default methods to the interface and must have an ugly 2
class instead.- Since:
- 2.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface jenkins.scm.api.mixin.SCMHeadMixin
SCMHeadMixin.Equality
-
Method Summary
Modifier and TypeMethodDescriptionReturns theChangeRequestCheckoutStrategy
of thisChangeRequestSCMHead
.Returns the name of the actual head on the source control system which may or may not be different fromSCMHeadMixin.getName()
.Methods inherited from interface jenkins.scm.api.mixin.ChangeRequestSCMHead
getId, getTarget
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface jenkins.scm.api.mixin.SCMHeadMixin
getName, getOrigin
-
Method Details
-
getCheckoutStrategy
Returns theChangeRequestCheckoutStrategy
of thisChangeRequestSCMHead
.- Returns:
- the
ChangeRequestCheckoutStrategy
.
-
getOriginName
Returns the name of the actual head on the source control system which may or may not be different fromSCMHeadMixin.getName()
. For example in GitHub or Bitbucket this method would return the name of the origin branch whereasSCMHeadMixin.getName()
would return something likePR-24
. It is perfectly acceptable for a SCM implementation to return the same value asSCMHeadMixin.getName()
where the SCM implementation does not have a separate concept of origin name.- Returns:
- the name this
ChangeRequestSCMHead
would have if theSCMSource
were configured against theSCMHeadMixin.getOrigin()
directly and the change request were be discoverable as a regularSCMHead
orSCMHeadMixin.getName()
if such a concept is not possible in the backing source control system.
-