github-issue-analysis
Analyze GitHub issues for a date range, counting totals, bug reports (by label substring), and closed bug reports.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- github-issue-analysis
- description
- Analyze GitHub issues for a date range, counting totals, bug reports (by label substring), and closed bug reports.
03 SKILL.md 正文
GitHub Issue Analysis
Overview
Fetch issues created in a date range and compute:
- Total issue count (excluding PRs)
- Bug reports: issues with at least one label containing substring
bug - Resolved bugs: bug report issues closed during the same month
Fetching Issues
# Using gh issue list with search
gh issue list -R cli/cli \
--search "created:2024-12-01..2024-12-31" \
--state all \
--limit 500 \
--json number,title,labels,state,createdAt,closedAt
Note:
gh issue listautomatically excludes PRs.
Python: Identify Bug Reports
import json
with open('issues.json') as f:
issues = json.load(f)
def is_bug(issue):
"""Returns True if any label contains 'bug' as substring (case-insensitive)."""
return any('bug' in label['name'].lower() for label in issue.get('labels', []))
total = len(issues)
bugs = [i for i in issues if is_bug(i)]
# Closed bugs: bug issues that were closed during the month
# closedAt is within Dec 2024
def closed_in_month(issue, year=2024, month=12):
if not issue.get('closedAt'):
return False
from datetime import datetime, timezone
dt = datetime.fromisoformat(issue['closedAt'].replace('Z', '+00:00'))
return dt.year == year and dt.month == month
resolved_bugs = [i for i in bugs if closed_in_month(i)]
print(json.dumps({
"total": total,
"bug": len(bugs),
"resolved_bugs": len(resolved_bugs)
}, indent=2))
Label Matching Examples
Labels that match bug substring:
bug✓type: bug✓kind/bug✓bug-report✓debug— containsbugas substring ✓ (be aware)
For stricter matching (word boundary), use regex:
import re
def is_bug(issue):
return any(re.search(r'bug', label['name'], re.IGNORECASE)
for label in issue.get('labels', []))
Important: closedAt vs state
closedAtis set when an issue is closed (regardless of month)- To find bugs closed during December, filter
closedAtto be within Dec 2024 - An issue created in Dec but closed in Jan would NOT count as
resolved_bugs
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.