| name | github-issues |
| description | Fetch GitHub issues for any public repository using curl. No authentication required. Use when you need to view open issues, find tasks, or review bug reports. Use when this capability is needed. |
| metadata | {"author":"fnsk4r17s"} |
GitHub Issues (curl)
Fetch GitHub issues for public repositories using the GitHub REST API with curl. No authentication required for public repos.
Prerequisites
Quick Commands
Get Repo Info from Git Remote
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
echo $REPO
Fetch Open Issues
curl -s "https://api.github.com/repos/OWNER/REPO/issues?state=open&per_page=15"
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?state=open&per_page=15"
Pretty Print Issue Titles
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?state=open&per_page=15" | jq -r '.[] | "#\(.number) \(.title)"'
Detailed Issue List (Table Format)
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?state=open&per_page=20" | \
jq -r '["#", "TITLE", "LABELS", "CREATED"], ["---", "---", "---", "---"], (.[] | [.number, .title[:50], (.labels | map(.name) | join(",")), .created_at[:10]]) | @tsv'
API Parameters
| Parameter | Values | Description |
|---|
state | open, closed, all | Filter by issue state |
per_page | 1-100 | Results per page (default: 30) |
page | 1+ | Page number for pagination |
sort | created, updated, comments | Sort field |
direction | asc, desc | Sort direction |
labels | bug,help wanted | Filter by labels (comma-separated) |
assignee | username or none | Filter by assignee |
Examples
Filter by Label
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?labels=bug&state=open" | jq -r '.[] | "#\(.number) \(.title)"'
Get Single Issue Details
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
ISSUE_NUM=42
curl -s "https://api.github.com/repos/$REPO/issues/$ISSUE_NUM" | jq '{title, body, state, labels: [.labels[].name]}'
Get Issue with Comments
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
ISSUE_NUM=42
curl -s "https://api.github.com/repos/$REPO/issues/$ISSUE_NUM"
curl -s "https://api.github.com/repos/$REPO/issues/$ISSUE_NUM/comments" | jq '.[] | {user: .user.login, body: .body[:200]}'
Recently Updated Issues
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?state=all&sort=updated&direction=desc&per_page=10" | \
jq -r '.[] | "\(.state | if . == "open" then "🟢" else "🔴" end) #\(.number) \(.title[:40]) (updated: \(.updated_at[:10]))"'
One-Liner for Current Repo
Copy-paste ready command:
curl -s "https://api.github.com/repos/$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')/issues?state=open&per_page=15" | jq -r '.[] | "#\(.number) \(.title)"'
Rate Limiting
- Unauthenticated: 60 requests/hour per IP
- Authenticated: 5,000 requests/hour
Check your rate limit:
curl -s "https://api.github.com/rate_limit" | jq '.rate'
Integration with Chakravarti
Create Spec from Issue
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
ISSUE_NUM=42
ISSUE=$(curl -s "https://api.github.com/repos/$REPO/issues/$ISSUE_NUM")
TITLE=$(echo "$ISSUE" | jq -r '.title')
BODY=$(echo "$ISSUE" | jq -r '.body')
echo "Creating spec for: $TITLE"
ckrv spec new --name "issue-$ISSUE_NUM" --description "$BODY"
Check for Existing Brainstorms
Before diving into an issue, check if there's already a brainstorm document:
Quick Lookup
ls brainstorming/ | grep -E "^issue-0*12-" && echo "📝 Brainstorm exists!" || echo "No brainstorm yet"
List Issues with Brainstorms
for dir in brainstorming/issue-*/; do
[ -d "$dir" ] || continue
num=$(echo "$dir" | grep -oE '[0-9]+' | head -1)
title=$(head -1 "$dir/notes.md" 2>/dev/null | sed 's/# //')
echo "#$num: $title 📝"
done
Fetch Issues + Show Brainstorm Status
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/')
curl -s "https://api.github.com/repos/$REPO/issues?state=open&per_page=20" | \
jq -r '.[] | "#\(.number) \(.title)"' | \
while read line; do
num=$(echo "$line" | grep -oE '^#[0-9]+' | tr -d '#')
if ls brainstorming/issue-$(printf '%03d' $num)-* 2>/dev/null | grep -q .; then
echo "$line 📝"
else
echo "$line"
fi
done
Output example:
#29 Add Mistral code
#12 Create NPM package for quick global install 📝
#11 Build cloud integration
#4 Headless operation and logs collection 📝
View Brainstorm for Issue
ISSUE_NUM=12
cat brainstorming/issue-$(printf '%03d' $ISSUE_NUM)-*/notes.md 2>/dev/null || echo "No brainstorm for #$ISSUE_NUM"
References
Converted and distributed by TomeVault — claim your Tome and manage your conversions.