| name | fix-dependabot-prs |
| description | dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成する。dependabotのPR対応を依頼された時に使用。 |
| allowed-tools | Read, Bash(gh run:*), Bash(gh pr:*), Bash(git status:*), Bash(git push:*), Bash(git add:*), Bash(git commit:*), Bash(git cherry-pick:*), Bash(git merge:*), Bash(git fetch:*), Bash(git pull:*), Bash(git diff:*), Bash(git checkout:*), Bash(flutter:*), Bash(dart:*), Bash(pod:*), Glob, Grep, Write |
Dependabot PRまとめ解決スキル
dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成します。
実行手順
1. dependabotのPR一覧を取得
gh pr list --author "app/dependabot" --state open
2. 各PRの状態を確認
各PRについて以下を確認する:
- PRの変更内容(
gh pr view <PR番号>)
- GitHub ActionsのCI結果(
gh pr checks <PR番号>)
- 差分内容(
gh pr diff <PR番号>)
3. まとめブランチを作成
git checkout main
git pull origin main
git checkout -b chore/dependabot-updates-$(date +%Y%m%d%H%M%S)
4. 各PRの変更を取り込む
各dependabot PRのブランチから変更を取り込む:
git fetch origin <dependabotブランチ名>
git cherry-pick <コミットハッシュ>
git merge origin/<dependabotブランチ名> --no-edit
5. 矛盾の解決
PR同士で矛盾する変更がある場合: