fixing-github-merge-conflicts
GitHub自动修复GitHub仓库中拉取请求的合并冲突。通过扫描并逐个将基础分支合并到存在冲突的非草稿PR,处理CI检查及后续决策报告。
Trigger Scenarios
Install
npx skills add Tracer-Cloud/opensre --skill fixing-github-merge-conflicts -g -y
SKILL.md
Frontmatter
{
"name": "fixing-github-merge-conflicts",
"metadata": {
"owner": "Vincent",
"version": "1.1",
"requires": [
"GitHub authentication with write access to the pull request branches.",
"An installed and authenticated coding agent for conflicts git cannot merge on its own.",
"The summarize_github_pr_status and fix_github_pr_ci tools."
],
"usecases": [
"For a scheduled loop that keeps a repository's open pull requests free of merge conflicts.",
"For maintainers asking OpenSRE to fix the merge conflicts on a repository's open pull requests."
],
"last_changed_at": 1791072000,
"last_changed_by": "Vincent"
},
"description": "Merge the base branch into open pull requests that conflict with it, one at a time with fix_github_pr_ci, and report the merges a person must decide. Use when asked to fix the merge conflicts on a repository's pull requests, and for scheduled conflict loops."
}
Fixing GitHub merge conflicts
Merge the base branch into each open, same-repository, non-draft pull request that conflicts with it.
Plan
Only when step 1 finds a target, list update_plan before the first
fix_github_pr_ci call: step 1 completed, step 2 in_progress with
verifies: true, step 3 pending.
- Step 1. Find the conflicting pull requests with summarize_github_pr_status.
- Step 2. Merge the base branch into each one with fix_github_pr_ci.
- Step 3. Reply with one line per new result.
Workflow
1. Find the conflicting pull requests
Call summarize_github_pr_status(owner, repo, conflicts_only=true); the targets
have repairable: true and either mergeable: false or mergeable_state: "dirty".
Complete when the scan has returned.
2. Merge the base branch into each target
Call fix_github_pr_ci(owner, repo, pr_number) once per target, one at a time;
it merges, pushes, waits for the checks, and comments on the pull request when
a person must decide. Never run git or gh around it, and never merge a pull
request. Complete when every target has a result.
3. Reply
Write one line per target whose result is new (one with already_reported: true
is not): its link, then checks_state and any error_kind and error, as
returned; with no line left, reply with only the note line. Complete when the
reply is sent.
Version History
- 88dba66 Current 2026-10-19 05:34


