Run2 gh rest api
Using the GitHub REST Search API to query PRs and issues with date filtering, pagination, and field extraction.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_gh-rest-apiAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.4 KB, 361 tokens by cl100k_base, as published. Nobody here has run it
GitHub REST Search API for Repository Activity
Search endpoints
- PRs:
https://api.github.com/search/issues?q=repo:OWNER/REPO+type:pr+created:YYYY-MM-DD..YYYY-MM-DD - Issues:
https://api.github.com/search/issues?q=repo:OWNER/REPO+type:issue+created:YYYY-MM-DD..YYYY-MM-DD
Pagination
per_pagemax is 100- Use
&page=Nfor subsequent pages total_countin response gives total matches
PR states in Search API
- Search API returns
state: "open"orstate: "closed" - Merged PRs have
state: "closed"ANDpull_request.merged_at != null - Closed-not-merged PRs have
state: "closed"ANDpull_request.merged_at == null - The
pull_requestobject in search results containsmerged_at
Issue fields
labels: array of objects withname,color, etc.state: "open" or "closed"closed_at: ISO 8601 timestamp or nullcreated_at: ISO 8601 timestamp
Rate limiting
- Unauthenticated: 10 requests/minute for search API
- Authenticated: 30 requests/minute
- Add
&per_page=100to minimize requests
Important notes
- Search API
created:qualifier uses inclusive date range closed:qualifier can filter by close date:closed:2024-12-01..2024-12-31- The
type:issueexcludes PRs;type:prexcludes issues
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.