Class AutoFixOrchestrator
java.lang.Object
io.jenkins.plugins.explain_error.autofix.AutoFixOrchestrator
Main coordinator for the AI auto-fix workflow.
Asks the configured AI provider for a fix suggestion, validates all file paths and diffs, applies changes to a new branch via the SCM API, and opens a pull request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattemptAutoFix(Run<?, ?> run, String errorLogs, BaseAIProvider aiProvider, String credentialsId, String remoteUrl, String scmTypeOverride, String githubEnterpriseUrl, String gitlabUrl, String bitbucketUrl, List<String> allowedPathGlobs, boolean draftPr, int timeoutSeconds, TaskListener listener, String prTemplate) Attempts to automatically fix the build failure described byerrorLogs.
-
Constructor Details
-
AutoFixOrchestrator
public AutoFixOrchestrator()
-
-
Method Details
-
attemptAutoFix
public AutoFixResult attemptAutoFix(Run<?, ?> run, String errorLogs, BaseAIProvider aiProvider, String credentialsId, String remoteUrl, String scmTypeOverride, String githubEnterpriseUrl, String gitlabUrl, String bitbucketUrl, List<String> allowedPathGlobs, boolean draftPr, int timeoutSeconds, TaskListener listener, String prTemplate) Attempts to automatically fix the build failure described byerrorLogs.- Parameters:
run- the failing build runerrorLogs- the error logs to analyseaiProvider- the configured AI providercredentialsId- Jenkins credentials ID for SCM token (StringCredentials)remoteUrl- explicit SCM remote URL; if null or blank, extracted from the job's SCM configscmTypeOverride- optional override for SCM type detection ("github"/"gitlab"/"bitbucket")githubEnterpriseUrl- optional GitHub Enterprise API base URL (e.g. https://ghe.example.com)gitlabUrl- optional self-hosted GitLab base URLbitbucketUrl- optional self-hosted Bitbucket base URLallowedPathGlobs- list of glob patterns that restrict which files may be changeddraftPr- whether to open a draft PRtimeoutSeconds- overall timeout in secondslistener- task listener for build-log output- Returns:
- the result of the auto-fix attempt
-