Package jenkins.scm.api
Class SCMRevisionAction
- java.lang.Object
-
- hudson.model.InvisibleAction
-
- jenkins.scm.api.SCMRevisionAction
-
- All Implemented Interfaces:
Action
,ModelObject
@ExportedBean public class SCMRevisionAction extends InvisibleAction
Action
added toAbstractBuild
to remember which revision is built in the given build.
-
-
Constructor Summary
Constructors Constructor Description SCMRevisionAction(SCMRevision revision)
Deprecated.SCMRevisionAction(SCMSource source, SCMRevision revision)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SCMRevision
getRevision()
Gets theSCMRevision
.static SCMRevision
getRevision(Actionable actionable)
Deprecated.static SCMRevision
getRevision(SCMSource source, Actionable actionable)
String
getSourceId()
Gets theSCMSource.getId()
that the revision was created for.-
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Constructor Detail
-
SCMRevisionAction
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("2.2.0") @Deprecated public SCMRevisionAction(@NonNull SCMRevision revision)
Deprecated.Constructor.- Parameters:
revision
- theSCMRevision
.
-
SCMRevisionAction
public SCMRevisionAction(@NonNull SCMSource source, @NonNull SCMRevision revision)
Constructor.- Parameters:
source
- theSCMSource
.revision
- theSCMRevision
.
-
-
Method Detail
-
getRevision
@Exported @NonNull public SCMRevision getRevision()
Gets theSCMRevision
.- Returns:
- the
SCMRevision
.
-
getSourceId
@CheckForNull public String getSourceId()
Gets theSCMSource.getId()
that the revision was created for.- Returns:
- the
SCMSource.getId()
that the revision was created for ornull
when legacy data - Since:
- 2.2.0
-
getRevision
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("2.2.0") @CheckForNull public static SCMRevision getRevision(@NonNull Actionable actionable)
Deprecated.Gets theSCMRevision
from the specifiedActionable
.- Parameters:
actionable
-Actionable
containing a possibleSCMRevisionAction
.- Returns:
- the
SCMRevision
.
-
getRevision
@CheckForNull public static SCMRevision getRevision(@NonNull SCMSource source, @NonNull Actionable actionable)
- Parameters:
source
- theSCMSource
to get the revision for.actionable
-Actionable
containing a possibleSCMRevisionAction
.- Returns:
- the
SCMRevision
.
-
-