Skip to content

Commit 387d1ba

Browse files
fix: migrate Issue Fixer to REST + ProjectsV2 (#9207)
* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions * Update .roo/rules-issue-fixer/4_github_cli_usage.xml Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> * Update .roo/rules-issue-fixer/4_github_cli_usage.xml Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> --------- Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent 8902fac commit 387d1ba

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.roo/rules-issue-fixer/1_Workflow.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Then retrieve the issue:
1818

1919
<execute_command>
20-
<command>gh issue view [issue-number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author</command>
20+
<command>gh api repos/[owner]/[repo]/issues/[issue-number] --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</command>
2121
</execute_command>
2222

2323
If the command fails with an authentication error (e.g., "gh: Not authenticated" or "HTTP 401"), ask the user to authenticate:
@@ -49,7 +49,7 @@
4949
- Any decisions or changes to requirements
5050

5151
<execute_command>
52-
<command>gh issue view [issue number] --repo [owner]/[repo] --comments</command>
52+
<command>gh api repos/[owner]/[repo]/issues/[issue-number]/comments --paginate --jq '.[].body'</command>
5353
</execute_command>
5454

5555
Also check for:

.roo/rules-issue-fixer/4_github_cli_usage.xml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@
2929

3030
<primary_commands>
3131
<command name="gh_issue_view">
32-
<purpose>Retrieve the issue details at the start</purpose>
32+
<purpose>Retrieve the issue details at the start using the REST Issues API.</purpose>
3333
<when>Always use first to get the full issue content</when>
34-
<syntax>gh issue view [issue-number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author</syntax>
34+
<syntax>gh api repos/[owner]/[repo]/issues/[issue-number] --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</syntax>
3535
<example>
3636
<execute_command>
37-
<command>gh issue view 123 --repo octocat/hello-world --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author</command>
37+
<command>gh api repos/octocat/hello-world/issues/123 --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</command>
3838
</execute_command>
3939
</example>
4040
</command>
4141

4242
<command name="gh_issue_comments">
43-
<purpose>Get additional context and requirements from issue comments</purpose>
43+
<purpose>Get additional context and requirements from issue comments.</purpose>
4444
<when>Always use after viewing issue to see full discussion</when>
45-
<syntax>gh issue view [issue-number] --repo [owner]/[repo] --comments</syntax>
45+
<syntax>gh api repos/[owner]/[repo]/issues/[issue-number]/comments --paginate --jq '.[].body'</syntax>
4646
<example>
4747
<execute_command>
48-
<command>gh issue view 123 --repo octocat/hello-world --comments</command>
48+
<command>gh api repos/octocat/hello-world/issues/123/comments --paginate --jq '.[].body'</command>
4949
</execute_command>
5050
</example>
5151
</command>
@@ -109,6 +109,30 @@
109109
</command>
110110
</optional_commands>
111111

112+
<projects_v2_commands>
113+
<command name="gh_projects_v2_for_issue">
114+
<purpose>Inspect associations with GitHub Projects (new Projects experience) for a given issue</purpose>
115+
<when>Use when project context is relevant to understanding priority, ownership, or workflow</when>
116+
<syntax>gh api graphql -f query='
117+
query($owner:String!, $repo:String!, $number:Int!) {
118+
repository(owner:$owner, name:$repo) {
119+
issue(number:$number) {
120+
projectsV2(first:20) {
121+
nodes {
122+
title
123+
url
124+
}
125+
}
126+
}
127+
}
128+
}
129+
' -F owner=[owner] -F repo=[repo] -F number=[issue-number]</syntax>
130+
<note>
131+
This uses the projectsV2 field from the new GitHub Projects experience for issue-level project context.
132+
</note>
133+
</command>
134+
</projects_v2_commands>
135+
112136
<pull_request_commands>
113137
<command name="gh_pr_create">
114138
<purpose>Create a pull request</purpose>

0 commit comments

Comments
 (0)