Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .squad-templates/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,27 @@ gh pr create \
--base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot

# Copilot's review identity is a GraphQL Bot, not a User/Team — the REST
# `gh pr edit --add-reviewer @copilot` path silently no-ops for it. Request the
# review through the verified GraphQL path instead:
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" || echo "Could not request a Copilot review via GraphQL; open the PR in the GitHub UI and add Copilot as a reviewer manually (Reviewers -> Copilot)." >&2
gh pr checks --watch
```

- Open the PR against the **runtime-captured** `${default_branch}`, not a hardcoded
`main`.
- Request Copilot review, address feedback, and wait for required checks.
- Request Copilot review via the GraphQL `requestReviewsByLogin` mutation
(never the REST `--add-reviewer` shortcut, which silently no-ops for the
Copilot Bot reviewer), address feedback, and wait for required checks. If
the GraphQL call fails, add Copilot as a reviewer manually from the PR's
GitHub UI.

### 9. Verify the native review contract after merge

Expand Down Expand Up @@ -497,7 +511,13 @@ git push -u origin HEAD
gh pr create --base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot # then wait for review + checks; DO NOT merge
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" # Bot-aware review request; then wait for review + checks; DO NOT merge
```

### ✓ Correct: STOP on an undocumented safe-update entry
Expand Down
185 changes: 143 additions & 42 deletions docs/src/content/docs/guide/gh-aw.md

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions packages/squad-cli/templates/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,27 @@ gh pr create \
--base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot

# Copilot's review identity is a GraphQL Bot, not a User/Team — the REST
# `gh pr edit --add-reviewer @copilot` path silently no-ops for it. Request the
# review through the verified GraphQL path instead:
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" || echo "Could not request a Copilot review via GraphQL; open the PR in the GitHub UI and add Copilot as a reviewer manually (Reviewers -> Copilot)." >&2
gh pr checks --watch
```

- Open the PR against the **runtime-captured** `${default_branch}`, not a hardcoded
`main`.
- Request Copilot review, address feedback, and wait for required checks.
- Request Copilot review via the GraphQL `requestReviewsByLogin` mutation
(never the REST `--add-reviewer` shortcut, which silently no-ops for the
Copilot Bot reviewer), address feedback, and wait for required checks. If
the GraphQL call fails, add Copilot as a reviewer manually from the PR's
GitHub UI.

### 9. Verify the native review contract after merge

Expand Down Expand Up @@ -497,7 +511,13 @@ git push -u origin HEAD
gh pr create --base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot # then wait for review + checks; DO NOT merge
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" # Bot-aware review request; then wait for review + checks; DO NOT merge
```

### ✓ Correct: STOP on an undocumented safe-update entry
Expand Down
26 changes: 23 additions & 3 deletions packages/squad-sdk/templates/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,27 @@ gh pr create \
--base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot

# Copilot's review identity is a GraphQL Bot, not a User/Team — the REST
# `gh pr edit --add-reviewer @copilot` path silently no-ops for it. Request the
# review through the verified GraphQL path instead:
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" || echo "Could not request a Copilot review via GraphQL; open the PR in the GitHub UI and add Copilot as a reviewer manually (Reviewers -> Copilot)." >&2
gh pr checks --watch
```

- Open the PR against the **runtime-captured** `${default_branch}`, not a hardcoded
`main`.
- Request Copilot review, address feedback, and wait for required checks.
- Request Copilot review via the GraphQL `requestReviewsByLogin` mutation
(never the REST `--add-reviewer` shortcut, which silently no-ops for the
Copilot Bot reviewer), address feedback, and wait for required checks. If
the GraphQL call fails, add Copilot as a reviewer manually from the PR's
GitHub UI.

### 9. Verify the native review contract after merge

Expand Down Expand Up @@ -497,7 +511,13 @@ git push -u origin HEAD
gh pr create --base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot # then wait for review + checks; DO NOT merge
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" # Bot-aware review request; then wait for review + checks; DO NOT merge
```

### ✓ Correct: STOP on an undocumented safe-update entry
Expand Down
26 changes: 23 additions & 3 deletions templates/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,27 @@ gh pr create \
--base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot

# Copilot's review identity is a GraphQL Bot, not a User/Team — the REST
# `gh pr edit --add-reviewer @copilot` path silently no-ops for it. Request the
# review through the verified GraphQL path instead:
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" || echo "Could not request a Copilot review via GraphQL; open the PR in the GitHub UI and add Copilot as a reviewer manually (Reviewers -> Copilot)." >&2
gh pr checks --watch
```

- Open the PR against the **runtime-captured** `${default_branch}`, not a hardcoded
`main`.
- Request Copilot review, address feedback, and wait for required checks.
- Request Copilot review via the GraphQL `requestReviewsByLogin` mutation
(never the REST `--add-reviewer` shortcut, which silently no-ops for the
Copilot Bot reviewer), address feedback, and wait for required checks. If
the GraphQL call fails, add Copilot as a reviewer manually from the PR's
GitHub UI.

### 9. Verify the native review contract after merge

Expand Down Expand Up @@ -497,7 +511,13 @@ git push -u origin HEAD
gh pr create --base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot # then wait for review + checks; DO NOT merge
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" # Bot-aware review request; then wait for review + checks; DO NOT merge
```

### ✓ Correct: STOP on an undocumented safe-update entry
Expand Down
2 changes: 1 addition & 1 deletion test/gh-aw-enlistment-skill.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ describe('gh-aw-enlistment skill', () => {

const setupSection = guide.slice(
guide.indexOf('### Enable GitHub Issues'),
guide.indexOf('### Allow workflow-created pull requests'),
guide.indexOf('### Set Actions pull-request permissions (Profile A, recommended)'),
);
expect(setupSection).toContain(
'test "$(gh api "repos/${owner_repo}" --jq \'.has_issues\')" = "true" || {',
Expand Down
3 changes: 2 additions & 1 deletion test/standalone-release-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,8 @@ describe('automated package publication', () => {
expect(ghAwGuide).toContain('gh aw compile --strict --approve');
expect(ghAwGuide).toContain('gh aw compile --strict');
expect(ghAwGuide).toContain('gh pr create');
expect(ghAwGuide).toContain('gh pr edit --add-reviewer @copilot');
expect(ghAwGuide).toContain('requestReviewsByLogin');
expect(ghAwGuide).toContain('copilot-pull-request-reviewer');
Comment on lines +706 to +707
expect(ghAwGuide).toContain('gh pr checks --watch');
expect(ghAwGuide).toContain('.github/aw/');
expect(ghAwGuide).toContain('`.vscode/settings.json`');
Expand Down
26 changes: 23 additions & 3 deletions workflows/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,27 @@ gh pr create \
--base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot

# Copilot's review identity is a GraphQL Bot, not a User/Team — the REST
# `gh pr edit --add-reviewer @copilot` path silently no-ops for it. Request the
# review through the verified GraphQL path instead:
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" || echo "Could not request a Copilot review via GraphQL; open the PR in the GitHub UI and add Copilot as a reviewer manually (Reviewers -> Copilot)." >&2
gh pr checks --watch
```

- Open the PR against the **runtime-captured** `${default_branch}`, not a hardcoded
`main`.
- Request Copilot review, address feedback, and wait for required checks.
- Request Copilot review via the GraphQL `requestReviewsByLogin` mutation
(never the REST `--add-reviewer` shortcut, which silently no-ops for the
Copilot Bot reviewer), address feedback, and wait for required checks. If
the GraphQL call fails, add Copilot as a reviewer manually from the PR's
GitHub UI.

### 9. Verify the native review contract after merge

Expand Down Expand Up @@ -497,7 +511,13 @@ git push -u origin HEAD
gh pr create --base "${default_branch}" \
--title "ci: add Squad agentic workflow" \
--body "Installs and strictly compiles the supported Squad GH-AW workflows."
gh pr edit --add-reviewer @copilot # then wait for review + checks; DO NOT merge
pr_node_id="$(gh pr view --json id --jq '.id')"
gh api graphql -f query='
mutation($pr: ID!) {
requestReviewsByLogin(input: { pullRequestId: $pr, botLogins: ["copilot-pull-request-reviewer"] }) {
pullRequest { number }
}
}' -f pr="${pr_node_id}" # Bot-aware review request; then wait for review + checks; DO NOT merge
```

### ✓ Correct: STOP on an undocumented safe-update entry
Expand Down
2 changes: 1 addition & 1 deletion workflows/squad-workflows.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"name": "gh-aw-enlistment",
"source": "workflows/skills/gh-aw-enlistment/SKILL.md",
"destination": ".github/skills/gh-aw-enlistment/SKILL.md",
"sha256": "fc6b63c3156d7861d28fcf459abee9e7f041d3581516ec38a684d5a902a27ac5"
"sha256": "dcf8b2975ecfd049f1689a4f68c183b074cebbd7455c19af680e25af673f1c5c"
}
],
"bootstrap": {
Expand Down
Loading