Skip to content

references/github-issues.md

skills/diagnosing-superpowers/references/github-issues.md · 1.6 KB · View on GitHub at 22f0b46

Use gh when it is installed and authenticated; it handles auth, rate limits, and JSON. Fall back to the public API with curl, then to a URL your partner opens.

Terminal window
gh search issues --repo obra/superpowers --limit 10 "<terms>" \
--json number,state,title --jq '.[] | "\(.number)\t\(.state)\t\(.title)"'

Without gh (unauthenticated, 10 requests a minute):

Terminal window
curl -s -H "Accept: application/vnd.github+json" \
"https://api.github.com/search/issues?q=repo:obra/superpowers+is:issue+<url-encoded terms>&per_page=10" \
| jq -r '.items[] | "\(.number)\t\(.state)\t\(.title)"'

Without curl, hand over https://github.com/obra/superpowers/issues?q=<terms>.

Write the filled templates/issue.md to the workspace and show the exact text. After approval:

Terminal window
gh issue create --repo obra/superpowers --title "<title>" --body-file <path> \
--label bug --label automated-issue-report

GitHub drops labels silently when the reporter lacks push access, so the labels land only for collaborators; the template footer still marks the issue as skill-filed. gh cannot attach files: give your partner the bundle path to attach through the browser after the issue exists.

Without gh, hand over a prefilled link on the bug_report.md template, which applies the bug label for any reporter:

https://github.com/obra/superpowers/issues/new?template=bug_report.md&title=<url-encoded title>&body=<url-encoded body>

GitHub rejects URLs over about 8,000 characters; past that, send the link with the title only and tell your partner to paste the body from the file.

Original Markdown source
references/github-issues.md
# GitHub issues
Use `gh` when it is installed and authenticated; it handles auth, rate
limits, and JSON. Fall back to the public API with curl, then to a URL
your partner opens.
## Search
```bash
gh search issues --repo obra/superpowers --limit 10 "<terms>" \
--json number,state,title --jq '.[] | "\(.number)\t\(.state)\t\(.title)"'
```
Without `gh` (unauthenticated, 10 requests a minute):
```bash
curl -s -H "Accept: application/vnd.github+json" \
"https://api.github.com/search/issues?q=repo:obra/superpowers+is:issue+<url-encoded terms>&per_page=10" \
| jq -r '.items[] | "\(.number)\t\(.state)\t\(.title)"'
```
Without curl, hand over `https://github.com/obra/superpowers/issues?q=<terms>`.
## File
Write the filled `templates/issue.md` to the workspace and show the exact
text. After approval:
```bash
gh issue create --repo obra/superpowers --title "<title>" --body-file <path> \
--label bug --label automated-issue-report
```
GitHub drops labels silently when the reporter lacks push access, so the
labels land only for collaborators; the template footer still marks the
issue as skill-filed. `gh` cannot attach files: give your partner the
bundle path to attach through the browser after the issue exists.
Without `gh`, hand over a prefilled link on the `bug_report.md` template,
which applies the `bug` label for any reporter:
```
https://github.com/obra/superpowers/issues/new?template=bug_report.md&title=<url-encoded title>&body=<url-encoded body>
```
GitHub rejects URLs over about 8,000 characters; past that, send the link
with the title only and tell your partner to paste the body from the file.