resolve-merge-conflicts

作成者: github

ベース参照をマージし、コンパイル済みワークフローのロックファイル競合を安全に再生成します。

npx skills add https://github.com/github/gh-aw --skill resolve-merge-conflicts

Resolve Merge Conflicts

Use this skill when merging origin/main into a branch, especially when the only conflicts are generated .github/workflows/*.lock.yml files.

One-step path

From the repository root, run:

./.github/skills/resolve-merge-conflicts/resolve.sh origin/main

The command works both before a merge and after another command has stopped on conflicts. It:

  1. Starts the merge with --no-commit, or resumes the current merge.
  2. Refuses to auto-resolve if any conflict is not a workflow .lock.yml.
  3. Scans .github/workflows/*.md for leftover conflict-marker lines (<<<<<<<, |||||||, =======, >>>>>>>) and aborts before compiling if any are found — see "Why the marker scan matters" below.
  4. Runs make recompile once so generated files come from the merged Markdown.
  5. Stages the regenerated conflicting lock files.
  6. Verifies that no unresolved paths or whitespace errors remain.

The script does not fetch, commit, push, abort, or edit workflow Markdown. Refresh origin/main first only when credentials are available. After success, review the staged merge, run the repository's final validation gate, then commit and push.

Why the marker scan matters

A source .md conflict resolved manually (by a human or an agent) can leave a stray conflict-marker line behind — most often the rarely-noticed ||||||| base (original) diff3 marker — inside a workflow's YAML frontmatter. git diff --check only inspects lines touched by the current diff/staged hunks, so a marker already committed in otherwise-unchanged file content passes silently. The gh-aw compiler then parses the marker text as a literal YAML header option (e.g. invalid header option: "|||||| base (original)"), which fails compilation later — often in an unrelated scheduled recompilation run, far from the original merge, making the root cause hard to trace back.

Run the standalone check any time you suspect a workflow .md file went through manual conflict resolution, even outside this script's merge flow:

./.github/skills/resolve-merge-conflicts/resolve.sh --verify-markers

It exits non-zero and lists the offending file(s)/line(s) if any marker is found, and does not modify the working tree.

Safety rules

  • Never choose ours or theirs for compiled lock files; regenerate them.
  • Never manually remove conflict markers from .lock.yml files.
  • Never auto-resolve a source .md, Go, JavaScript, or other mixed conflict.
  • If the script refuses a mixed conflict, resolve source conflicts on their merits, stage them, and rerun the same command. It will regenerate the remaining lock conflicts.
  • Do not abort an existing merge unless the user explicitly requests it.

githubのその他のスキル

debugging-workflows
github
GitHubのエージェンティックワークフローをデバッグするためのガイド - ログの分析、実行の監査、問題のトラブルシューティング
go-codemod
github
gh aw fix コマンド用のGoコードモッドを実装およびテストする。
acreadiness-policy
github
ユーザーがAgentRCポリシーを選択、作成、または適用するのを支援します。ポリシーは、関連性のないチェックを無効にしたり、影響度/レベルを上書きしたり、設定することで、レディネススコアリングをカスタマイズします。
ai-ready
github
あらゆるリポジトリをAI対応にします。コードベースを分析し、AGENTS.md、copilot-instructions.md、CIワークフロー、Issueテンプレートなどを生成します。PRレビューを解析し…
create-oo-component-documentation
github
オブジェクト指向コンポーネント向けに、業界のベストプラクティスとアーキテクチャ文書化標準に従った、包括的で標準化されたドキュメントを作成します。
dependabot
github
DependabotはGitHubに組み込まれた依存関係管理ツールであり、3つの主要機能を備えています。
doublecheck
github
AI出力のための3層検証パイプライン。検証可能な主張を抽出し、ウェブ検索で支持または反証する情報源を見つけ、敵対的レビューを実行…
foundry-agent-sync
github
ローカルのJSONマニフェストから、REST APIを介してAzure AI Foundry内でプロンプトベースのAIエージェントを直接作成および同期します。スキャフォールディングスキルとは異なり、単に…