Skip to content

Conversation

github-actions[bot]
Copy link

Closes #223

Applied changes based on Issue #223.

I’ve added end-to-end support for a new --fix-build flag:

Parsing the flag
processEvent now recognizes --fix-build both in issue/PR comments and in the direct-prompt input.
– Added an includeFixBuild: boolean field to the ProcessedEvent interface.

Fetching the latest failure logs
– Introduced fetchLatestFailedWorkflowLogs(octokit, repo) which uses the GitHub Actions API to find the most recent failed run and returns its logs URL (or an error message).

Injecting logs into the prompt
– In runAction, if includeFixBuild is true, we pull in those logs and build a prompt like:
“Latest failed build logs: …Please suggest changes to fix the build errors above.”
– This prompt then flows through generatePromptrunCodex and results in an automated PR to fix the build.

Tests updated
– The direct-prompt and issues-assigned unit tests now expect includeFixBuild: false when not using the new flag.

Let me know if you’d like to tweak how much of the logs is passed (e.g. full text extraction vs. just the URL) or adjust the prompt wording!

@YiweiShen YiweiShen merged commit f79be5c into main Jun 22, 2025
@YiweiShen YiweiShen deleted the codez-chore-223-apply-changes-for-issue-223 branch June 22, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a feature allowing Codex to fix the build.

1 participant