gh-cli-search
Using the gh CLI to search and list GitHub issues and pull requests with date filters and label queries.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- gh-cli-search
- description
- Using the gh CLI to search and list GitHub issues and pull requests with date filters and label queries.
03 SKILL.md 正文
GitHub CLI: Searching Issues and Pull Requests
Overview
The gh CLI provides powerful commands for listing and searching issues and PRs in any public repository. Key subcommands: gh pr list, gh issue list, and gh search variants.
Listing PRs by Date Range
# List PRs created in a date range (returns up to --limit items)
gh pr list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31" --limit 500 --json number,state,author,createdAt,mergedAt,closedAt
Key flags:
--state allincludes open, closed, and merged PRs--searchaccepts GitHub search qualifiers likecreated:YYYY-MM-DD..YYYY-MM-DD--jsonselects fields; available fields include:number,state,author,createdAt,mergedAt,closedAt,title,labels--limit Ncontrols max results (default 30)
Listing Issues by Date Range
# List issues created in a date range
gh issue list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31" --limit 500 --json number,state,labels,createdAt,closedAt
Note: gh issue list excludes pull requests by default.
Searching with Labels
# Search for issues with a label containing "bug"
gh issue list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31 label:bug" --limit 500 --json number,state,labels,closedAt
For labels with spaces or special characters, quote them: label:"type: bug".
Pagination / Limits
- The
--limitflag can go up to 1000 per call. - For very large result sets, paginate using
gh apiwith--paginate.
Using gh api for More Control
# Direct API call with search endpoint
gh api search/issues --method GET \
-f q='repo:owner/repo is:pr created:2024-12-01..2024-12-31' \
-f per_page=100 \
--paginate
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.