Skip to content

Commit 4545f16

Browse files
x3ekclaude
andauthored
chore(dx): tighten github skill — issue creation flow + Copilot review docs (#80)
* chore(dx): require milestone + type when filing new issues After filing #79 with only labels and getting flagged, tighten the docs so the agent matches the full convention (title + body + labels + milestone + type) by default. Replaces the 'prompt about milestone' step with 'apply the active milestone; only ask if multiple are active' so this works in autonomous-mode runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(github): how to request and await Copilot review Add a Copilot Code Review section to references/pull-requests.md covering: the working reviewer identifier (copilot-pull-request-reviewer[bot] with brackets), the two correct waiting signals (copilot_work_started timeline event for 'work started', then the reviews API for 'review submitted'), the ~60s lag before inline comments populate, and how to reply / re-request. The Copilot reviewer is a GitHub App posting reviews directly — it does NOT produce a workflow run or a check, so gh run list and gh pr checks won't help. The signals live on the issue timeline and reviews APIs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 119df90 commit 4545f16

3 files changed

Lines changed: 56 additions & 21 deletions

File tree

.claude/skills/github/SKILL.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,25 @@ Use the `gh` CLI for all GitHub operations. Run individual `gh` commands via the
3434
3535
### Creation Flow
3636
37-
1. **Search for duplicates** before creating:
38-
```bash
39-
gh issue list --search "keyword" --state all
40-
```
37+
A complete issue has **title + body + labels + milestone + type**. Don't ship partial issues.
4138
42-
2. **Create the issue:**
39+
1. Search for duplicates: `gh issue list --search "keyword" --state all`
40+
2. Create with title, body, labels in one call:
4341
```bash
44-
gh issue create --title "Add dark mode" --body "$(cat <<'EOF'
45-
## Description
46-
Add dark mode support.
47-
48-
## Acceptance Criteria
49-
- Toggle in settings
50-
- Persists across sessions
42+
gh issue create --title "..." --label "engine,enhancement" --body "$(cat <<'EOF'
43+
...
5144
EOF
52-
)" --label "enhancement"
45+
)"
5346
```
54-
55-
3. **Set issue type** — see `references/graphql.md` for GraphQL mutations, or use the helper script:
47+
3. Set milestone (default `SquishMark 1.0`; only ask if multiple are active):
48+
`gh issue edit <num> --milestone "SquishMark 1.0"`
49+
4. Set type (`Feature`/`Bug`/`Task`):
5650
```bash
57-
python .claude/skills/github/scripts/github-issue-updater.py 42 --type task
51+
python .claude/skills/github/scripts/github-issue-updater.py <num> --type feature
5852
```
53+
Or via GraphQL — see `references/graphql.md`.
5954
60-
4. **Apply labels:** `gh issue edit 42 --add-label "engine,enhancement"` — see `references/labels.md`
61-
62-
5. **Prompt about milestone** — ask the user. See `references/milestones.md`
55+
See `references/labels.md` and `references/milestones.md` for available values.
6356
6457
### Edit and Search
6558
@@ -71,7 +64,7 @@ gh issue list --search "label:bug sort:updated-desc"
7164
7265
## Pull Requests
7366
74-
See `references/pull-requests.md` for create, review, comment, and merge commands.
67+
See `references/pull-requests.md` for create, review, comment, merge, and Copilot review commands.
7568
7669
## Conventions
7770

.claude/skills/github/references/pull-requests.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,48 @@ EOF
3636
gh pr review 42 --approve --body "LGTM"
3737
```
3838

39+
## Copilot Code Review
40+
41+
The Copilot reviewer is a GitHub App, **not** a workflow run or check — `gh run list` and `gh pr checks` won't show it. The signals live on the issue/PR timeline and reviews APIs.
42+
43+
### Request
44+
45+
```bash
46+
echo '{"reviewers": ["copilot-pull-request-reviewer[bot]"]}' \
47+
| gh api repos/{owner}/{repo}/pulls/<num>/requested_reviewers -X POST --input -
48+
```
49+
50+
The brackets in the login matter. `gh pr edit --add-reviewer copilot-pull-request-reviewer` returns 422; `reviewers: ["Copilot"]` is silently dropped.
51+
52+
### Wait
53+
54+
Two signals, in order:
55+
56+
1. **`copilot_work_started`** — timeline event posted within seconds of the request, performed by app `copilot-pull-request-reviewer`. Confirms the bot picked up the request.
57+
```bash
58+
gh api repos/{owner}/{repo}/issues/<num>/timeline --paginate \
59+
--jq '.[] | select(.event=="copilot_work_started") | .created_at'
60+
```
61+
2. **Review submitted** — appears in `pulls/<num>/reviews` (typically <2 min later). After the review lands, allow ~60s before fetching inline comments — they lag the review.
62+
```bash
63+
gh api repos/{owner}/{repo}/pulls/<num>/reviews \
64+
--jq '.[] | select(.user.login=="copilot-pull-request-reviewer[bot]")'
65+
gh api repos/{owner}/{repo}/pulls/<num>/comments \
66+
--jq '.[] | {id, path, line, body}'
67+
```
68+
69+
### Reply to inline comments
70+
71+
```bash
72+
gh api repos/{owner}/{repo}/pulls/<num>/comments/<comment_id>/replies \
73+
-X POST -f body="...
74+
*— Claude*"
75+
```
76+
77+
### Re-review
78+
79+
The bot reviews once per request. New commits don't auto-trigger a re-review — re-request the reviewer for a fresh pass.
80+
3981
## Merge
4082

4183
```bash

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ When planning implementation work, follow this workflow:
2525
- Prompt about GitHub issue tracking:
2626
- "Should we use an existing GitHub issue, create a new one, or skip issue tracking?"
2727
- If existing: ask for issue number
28-
- If new: create issue with appropriate title/description
28+
- If new: file via the `github` skill's full creation flow — **title + body + labels + milestone + type**. Don't ship a label-only issue.
2929
- Prompt about branch creation:
3030
- "Should we create a new branch for this work?"
3131
- Use **Conventional Commits style prefixes** matching the anticipated merge commit

0 commit comments

Comments
 (0)