Query GitHub PRs for December Activity
Fetch all pull requests created in December 2024 from cli/cli repository using the GitHub CLI, applying correct date range filtering to ensure accurate total count and contributor identification.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 7
01 前言 Front Matter
- name
- Query GitHub PRs for December Activity
- description
- Fetch all pull requests created in December 2024 from cli/cli repository using the GitHub CLI, applying correct date range filtering to ensure accurate total count and contributor identification.
03 SKILL.md 正文
Query GitHub PRs for December Activity
Overview
Use gh pr list with proper date range syntax to retrieve all PRs created between 2024-12-01 and 2024-12-31 in the cli/cli repository.
Step 1: Test the Search Syntax
First, verify the correct syntax for date range filtering with gh pr list:
gh pr list \
--repo cli/cli \
--state all \
--search "created:2024-12-01..2024-12-31" \
--json number,title,author,createdAt,mergedAt,closedAt,state \
--limit 200
Critical Notes:
gh pr listmay NOT support--searchflag directly — checkgh pr list --help- If
--searchdoesn't work, you may need to usegh api graphqlinstead for complex date filtering - Test this command locally first to confirm it returns results before using in scripts
- The date format
YYYY-MM-DDshould be ISO-8601 compatible - Increase
--limitif you expect more than 200 PRs
Step 2: Verify Output Fields
Ensure the JSON output contains:
number: PR identifierauthor: Object withloginfield (for top contributor)createdAt: ISO-8601 timestamp (for date range filtering)mergedAt: ISO-8601 timestamp or null (indicates merge status)closedAt: ISO-8601 timestamp or nullstate: Should beMERGED,CLOSED, orOPEN(verify actual values)
Step 3: Parse and Count
From the returned JSON:
- Count total number of records returned
- Count records where
state == "MERGED"(do NOT use mergedAt != null alone) - Count records where
state == "CLOSED"(and mergedAt == null to exclude merged PRs) - Extract author login and count occurrences to find top contributor
Troubleshooting
- If counts are still too high, check if
--searchis including PRs outside the date range - Verify state values are exactly as expected (case-sensitive)
- Consider using GraphQL query if CLI flags prove unreliable
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.