Skip to content

Commit 501b2c2

Browse files
committed
fix: sync align-pr-branch component surfaces
- add align-pr-branch to the bundled component config in the root, core, and opencode manifests - document align-pr-branch in the component index and add a dedicated reference page - keep the new shared component aligned across runtime, config, and docs surfaces
1 parent 55dcbae commit 501b2c2

5 files changed

Lines changed: 20 additions & 0 deletions

File tree

kompass.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252

5353
"components": {
54+
"align-pr-branch": { "enabled": true },
5455
"change-summary": { "enabled": true },
5556
"changes-summary": { "enabled": true },
5657
"commit": { "enabled": true },

packages/core/kompass.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252

5353
"components": {
54+
"align-pr-branch": { "enabled": true },
5455
"change-summary": { "enabled": true },
5556
"changes-summary": { "enabled": true },
5657
"commit": { "enabled": true },

packages/opencode/kompass.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252

5353
"components": {
54+
"align-pr-branch": { "enabled": true },
5455
"change-summary": { "enabled": true },
5556
"changes-summary": { "enabled": true },
5657
"commit": { "enabled": true },
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: align-pr-branch
3+
description: Shared partial for aligning PR-scoped commands to the pull request branch.
4+
---
5+
6+
## Behavior
7+
8+
- requires the caller to provide `<pr-branch>`
9+
- runs `gh pr checkout <pr-context.pr.number>` before local PR analysis or edits
10+
- stores the active branch as `<active-branch>` after checkout
11+
- stops if checkout fails or if the active branch does not match `<pr-branch>`
12+
- accepts caller-provided wording through `it.action` and `it.scope`

packages/web/src/content/docs/docs/reference/components/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Kompass command templates can include reusable Eta partials from `packages/core/
77

88
Bundled components:
99

10+
- `align-pr-branch`
1011
- `change-summary`
1112
- `changes-summary`
1213
- `commit`
@@ -18,6 +19,10 @@ Bundled components:
1819

1920
## Bundled components
2021

22+
### `align-pr-branch`
23+
24+
Guides PR-scoped commands to switch onto the PR head branch with `gh pr checkout`, capture the active branch, and stop if local work is not aligned to the PR branch.
25+
2126
### `change-summary`
2227

2328
Loads changes with `changes_load`, analyzes file-level diffs, and groups the work into concise what/why themes.

0 commit comments

Comments
 (0)