Class AutoFixAction
java.lang.Object
io.jenkins.plugins.explain_error.autofix.AutoFixAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
A Jenkins
RunAction2 that stores auto-fix results and provides
a UI page under the build's action sidebar.-
Constructor Summary
ConstructorsConstructorDescriptionAutoFixAction(AutoFixStatus status, String prUrl, String branchName, String message, String prTitle, long timestamp, String scmType) Creates an AutoFixAction with all fields. -
Method Summary
Modifier and TypeMethodDescriptionReturns a formatted date/time string for the action timestamp.getPrUrl()Run<?, ?> getRun()Returns a human-readable label for the current status.longbooleanReturns true when this action represents a successfully created PR.voidonAttached(Run<?, ?> r) voidprotected ObjectUsed for XStream deserialization backward compatibility.
-
Constructor Details
-
AutoFixAction
public AutoFixAction(AutoFixStatus status, String prUrl, String branchName, String message, String prTitle, long timestamp, String scmType) Creates an AutoFixAction with all fields.- Parameters:
status- the result statusprUrl- the URL of the created PR, or nullbranchName- the fix branch name, or nullmessage- human-readable status messageprTitle- the PR title, or nulltimestamp- epoch millis when this action was createdscmType- "GITHUB", "GITLAB", "BITBUCKET", or null
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
readResolve
Used for XStream deserialization backward compatibility. All fields are final and serialized; no migration needed. -
getStatus
-
getPrUrl
-
getBranchName
-
getMessage
-
getPrTitle
-
getTimestamp
public long getTimestamp() -
getScmType
-
getRun
-
hasCreatedPr
public boolean hasCreatedPr()Returns true when this action represents a successfully created PR. -
getStatusDisplayName
Returns a human-readable label for the current status. -
getFormattedTimestamp
Returns a formatted date/time string for the action timestamp.
-