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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA line of a unified diff.static final classOne file the AI proposed to change. -
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 the page of the fix branch on the SCM host, worked out from the pull request URL, ornullwhen the URL is not one of a pull request on a known host.Returns 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.booleanbooleanWhether there is anything from the AI to show: its reasoning, or changes.voidonAttached(Run<?, ?> r) voidprotected ObjectUsed for XStream deserialization backward compatibility.voidsetSuggestion(FixSuggestion suggestion) Keeps what the AI proposed, so that a fix that did not become a pull request can still be read and applied by hand.
-
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
-
setSuggestion
Keeps what the AI proposed, so that a fix that did not become a pull request can still be read and applied by hand. -
hasSuggestion
public boolean hasSuggestion()Whether there is anything from the AI to show: its reasoning, or changes. -
hasProposedChanges
public boolean hasProposedChanges() -
getProposedChanges
-
getSuggestedTitle
-
getSuggestedExplanation
-
getSuggestedConfidence
-
getSuggestedFixType
-
hasCreatedPr
public boolean hasCreatedPr()Returns true when this action represents a successfully created PR. -
getBranchUrl
Returns the page of the fix branch on the SCM host, worked out from the pull request URL, ornullwhen the URL is not one of a pull request on a known host. -
getStatusDisplayName
Returns a human-readable label for the current status. -
getFormattedTimestamp
Returns a formatted date/time string for the action timestamp.
-