Loading...
Loading...
Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.
npx skill4agent add odysseus0/symphony landghcommitpushpullorigin/mainpushcommitpush# Ensure branch and PR context
branch=$(git branch --show-current)
pr_number=$(gh pr view --json number -q .number)
pr_title=$(gh pr view --json title -q .title)
pr_body=$(gh pr view --json body -q .body)
# Check mergeability and conflicts
mergeable=$(gh pr view --json mergeable -q .mergeable)
if [ "$mergeable" = "CONFLICTING" ]; then
# Run the `pull` skill to handle fetch + merge + conflict resolution.
# Then run the `push` skill to publish the updated branch.
fi
# Preferred: use the Async Watch Helper below. The manual loop is a fallback
# when Python cannot run or the helper script is unavailable.
# Wait for review feedback: Codex reviews arrive as issue comments that start
# with "## Codex Review — <persona>". Treat them like reviewer feedback: reply
# with a `[codex]` issue comment acknowledging the findings and whether you're
# addressing or deferring them.
while true; do
gh api repos/{owner}/{repo}/issues/"$pr_number"/comments \
--jq '.[] | select(.body | startswith("## Codex Review")) | .id' | rg -q '.' \
&& break
sleep 10
done
# Watch checks
if ! gh pr checks --watch; then
gh pr checks
# Identify failing run and inspect logs
# gh run list --branch "$branch"
# gh run view <run-id> --log
exit 1
fi
# Squash-merge (remote branches auto-delete on merge in this repo)
gh pr merge --squash --subject "$pr_title" --body "$pr_body"python3 .agents/skills/land/land_watch.pygh pr checksgh run view --logcommitpushorigin/mainorigin/mainUNKNOWN## Codex Review — <persona>git push --force-with-lease## Codex Review — <persona>gh apigh api repos/{owner}/{repo}/pulls/<pr_number>/commentsgh api repos/{owner}/{repo}/issues/<pr_number>/commentsgh api -X POST /repos/{owner}/{repo}/pulls/<pr_number>/comments \
-f body='[codex] <response>' -F in_reply_to=<comment_id>in_reply_to2710521800PRRC_.../pulls/<pr_number>/comments[codex][codex][codex] ...in_reply_to[codex] ...[codex][codex][codex] Changes since last review:
- <short bullets of deltas>
Commits: <sha>, <sha>
Tests: <commands run>[codex]