Skip to content

fix: align pr commands with head branch#73

Open
danielsuguimoto wants to merge 1 commit intokompassdev:mainfrom
danielsuguimoto:pr-tweaks
Open

fix: align pr commands with head branch#73
danielsuguimoto wants to merge 1 commit intokompassdev:mainfrom
danielsuguimoto:pr-tweaks

Conversation

@danielsuguimoto
Copy link
Copy Markdown

Ticket

SKIPPED

Overview

This PR fixes the PR review and PR fix command workflows so they operate on the pull request's actual head branch before reading or changing local repository files. It reduces the risk of reviewing or editing the wrong branch and keeps the generated OpenCode command docs aligned with the source templates.

Changes

  • Added PR branch tracking in the shared PR loading component so the workflows now capture:
    • the PR head branch from pr_load
    • the current local branch from git branch --show-current
  • Added an Align Local Branch step to packages/core/commands/pr/fix.md and packages/core/commands/pr/review.md that:
    • stops if the PR head branch cannot be determined
    • checks out the PR head branch when the local branch does not match
    • stops if that checkout fails
    • records the confirmed working branch as <active-branch>
  • Updated both workflows to require <active-branch> for any local file inspection or edits, making the branch-alignment rule explicit throughout the review and fix steps.
  • Synced the generated OpenCode command docs under packages/opencode/.opencode/commands/pr/ with the source command changes.

- require switching to the PR head branch before local inspection
- store the active branch for review and fix workflows
- sync generated opencode command docs with the source templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant