Skip to content

Commit 86ebd90

Browse files
authored
Add project board integration to agent workflows (#186)
- pr-creator step 6: move linked issue to "In progress" on Stackpop Development board (skip if already "In review"); add status ID table - issue-creator step 5: add new issues to board and set status to "Ready" with status ID reference table - Fix mojibake em dashes, add --assignee @me, add no-byline rule to CLAUDE.md - Update step 3 to ask user for issue number before auto-creating
1 parent 5d3fcd0 commit 86ebd90

File tree

2 files changed

+101
-2
lines changed

2 files changed

+101
-2
lines changed

.claude/agents/issue-creator.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,45 @@ Get the issue node ID with:
5151
gh issue view <number> --json id --jq '.id'
5252
```
5353

54-
### 5. Report
54+
### 5. Add to project board and set status
55+
56+
Add the issue to the **Stackpop Development** project and set its status to
57+
"Ready". The `addProjectV2ItemById` mutation returns the project item ID needed
58+
for the status update.
59+
60+
```
61+
ITEM_ID=$(gh api graphql -f query='mutation {
62+
addProjectV2ItemById(input: {
63+
projectId: "PVT_kwDOAAuvmc4BFjF5",
64+
contentId: "<issue_node_id>"
65+
}) { item { id } }
66+
}' --jq '.data.addProjectV2ItemById.item.id')
67+
```
68+
69+
Then set status to "Ready":
70+
71+
```
72+
gh api graphql -f query='mutation {
73+
updateProjectV2ItemFieldValue(input: {
74+
projectId: "PVT_kwDOAAuvmc4BFjF5",
75+
itemId: "'"$ITEM_ID"'",
76+
fieldId: "PVTSSF_lADOAAuvmc4BFjF5zg22lrY",
77+
value: { singleSelectOptionId: "61e4505c" }
78+
}) { projectV2Item { id } }
79+
}'
80+
```
81+
82+
Project board status IDs:
83+
84+
| Status | ID |
85+
| ----------- | ---------- |
86+
| Backlog | `f75ad846` |
87+
| Ready | `61e4505c` |
88+
| In progress | `47fc9ee4` |
89+
| In review | `df73e18b` |
90+
| Done | `98236657` |
91+
92+
### 6. Report
5593

5694
Output the issue URL and type.
5795

.claude/agents/pr-creator.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,68 @@ EOF
6363
)"
6464
```
6565

66-
### 6. Report
66+
### 6. Update issue status
67+
68+
After creating the PR, move the linked issue to "In progress" on the
69+
**Stackpop Development** project -- unless it is already "In review".
70+
71+
1. Get the issue's project item ID and current status:
72+
73+
```
74+
gh api graphql -f query='query($issueId: ID!) {
75+
node(id: $issueId) {
76+
... on Issue {
77+
projectItems(first: 10) {
78+
nodes {
79+
id
80+
fieldValueByName(name: "Status") {
81+
... on ProjectV2ItemFieldSingleSelectValue { name optionId }
82+
}
83+
}
84+
}
85+
}
86+
}
87+
}' -f issueId="<issue_node_id>"
88+
```
89+
90+
2. If the current status is **not** "In review" (`df73e18b`), set it to
91+
"In progress" (`47fc9ee4`):
92+
93+
```
94+
gh api graphql -f query='mutation {
95+
updateProjectV2ItemFieldValue(input: {
96+
projectId: "PVT_kwDOAAuvmc4BFjF5",
97+
itemId: "<project_item_id>",
98+
fieldId: "PVTSSF_lADOAAuvmc4BFjF5zg22lrY",
99+
value: { singleSelectOptionId: "47fc9ee4" }
100+
}) { projectV2Item { id } }
101+
}'
102+
```
103+
104+
3. If the issue is not yet on the project, add it first:
105+
106+
```
107+
gh api graphql -f query='mutation {
108+
addProjectV2ItemById(input: {
109+
projectId: "PVT_kwDOAAuvmc4BFjF5",
110+
contentId: "<issue_node_id>"
111+
}) { item { id } }
112+
}'
113+
```
114+
115+
Then set the status as above.
116+
117+
Project board status IDs:
118+
119+
| Status | ID |
120+
| ----------- | ---------- |
121+
| Backlog | `f75ad846` |
122+
| Ready | `61e4505c` |
123+
| In progress | `47fc9ee4` |
124+
| In review | `df73e18b` |
125+
| Done | `98236657` |
126+
127+
### 7. Report
67128

68129
Output the PR URL and a summary of what was included.
69130

0 commit comments

Comments
 (0)