Overview
OpenSRE can inspect failing GitHub Actions checks on a pull request or named branch, apply a code fix, commit it, push it, and wait for the new checks. It can also fix failing CI on a branch with no PR — say “fix the CI on main” and OpenSRE inspects the failing workflow runs on that branch’s head commit, applies a fix in a linked worktree, and pushes a fresh repair branch.Prerequisites
- Git installed on the machine running OpenSRE
ghonPATHfor checks and logs- GitHub token with repo write access plus workflow/check read access (
GITHUB_TOKEN/GH_TOKEN) - A coding-agent backend available (
CODING_AGENT=autoby default)
Setup
There is no dedicatedintegrations setup target for this tool. Configure GitHub access. A named repository or PR URL uses an isolated checkout.
For requests about your current checkout, you can set the coding workspace:
CODING_AGENT=auto by default.
Credentials
Tools
Related skill:
repair-github-ci.
Run /demo in the interactive shell for the guided CI/CD onboarding menu; its
recommended first option is CI/CD analytics.
Use it
In the interactive shell:What happens
- OpenSRE reads PR metadata or the latest failing Actions run on the target branch.
- It fetches compact log excerpts for failing Actions jobs.
- It creates an isolated checkout for a named repository, or verifies that your explicitly selected checkout matches.
- It refuses fork PRs because it only pushes to branches in the same repository.
- After approval, it checks out the PR head branch or creates a temporary linked git worktree for a branch target such as
main. - If the PR branch is behind its base branch (whether or not GitHub already reports a conflict), it merges the base branch into the PR branch first, so the fix is made on top of the current base and a failure already fixed there needs no further change. Conflicts go to the coding agent, lockfiles are regenerated rather than hand-merged, and the merge is committed only when no conflict remains.
- If files changed, it commits only the fix-run changes and pushes the PR branch or fresh repair branch.
- It verifies the exact pushed commit, allows one minute for its checks to register, waits for applicable workflows, and reports whether they passed, failed, were superseded by another push, or did not finish within 15 minutes. If GitHub reports the pushed commit as conflicted (the base moved during the repair), it merges the base branch into the pushed branch once, pushes again, and verifies that commit instead.
opensre/ci-fix-* repair branch, pushes that branch, and waits for the pushed commit’s own workflow runs. It does not push directly to protected branches such as main.
Verify
There is no dedicatedintegrations verify target. Confirm readiness by:
opensre integrations verify github(or a validGITHUB_TOKEN/GH_TOKEN)ghavailable onPATH- If supplying a checkout explicitly, its
originmatches the PR repository - A coding agent CLI is installed/logged in if auto mode needs one
Troubleshooting
Security
- Requires explicit confirmation before mutating the working tree or pushing.
- Pushes only to the existing PR head branch in the same repository.
- For branch targets, creates and pushes a fresh repair branch instead of pushing directly to
main. - Store tokens in
.envor your secret manager — not in source control.