Skip to content
Skills Library
Data & analytics · Analysis

gh-issue-analysis

/gh-issue-analysis

How to fetch and analyze GitHub issues for a repository within a date range: total counts, bug report identification by label substring matching, and resolved bug counts. Use this skill whenever the user asks about issue metrics, bug counts, triage stats, or community health reports for a GitHub repo.

Licence
MIT
Last repository change
02.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

How to fetch and analyze GitHub issues for a repository within a date range: total counts, bug report identification by label substring matching, and resolved bug counts. Use this skill whenever the user asks about issue metrics, bug counts, triage stats, or community health reports for a GitHub repo.

Original author description

How to fetch and analyze GitHub issues for a repository within a date range: total counts, bug report identification by label substring matching, and resolved bug counts. Use this skill whenever the user asks about issue metrics, bug counts, triage stats, or community health reports for a GitHub repo.

How it works

  1. Fetching issues (excluding PRs)
  2. Identifying bug reports
  3. Counting resolved bugs in the period
  4. Gotchas
Original SKILL.md headings · 87 lines, 321 words
SKILL.md preview
---
name: gh-issue-analysis
description: >
  How to fetch and analyze GitHub issues for a repository within a date range:
  total counts, bug report identification by label substring matching, and
  resolved bug counts. Use this skill whenever the user asks about issue
  metrics, bug counts, triage stats, or community health reports for a GitHub
  repo.
---

# Issue Analysis via GitHub REST API

## Fetching issues (excluding PRs)

The `/repos/{owner}/{repo}/issues` endpoint returns BOTH issues and PRs.
Filter out PRs by checking for the absence of the `pull_request` key:

```python
def get_issues(owner, repo, start_dt, end_dt, token=None):
    headers = {"Accept": "application/vnd.github+json"}
    if token:
        headers["Authorization"] = f"token {token}"

    results, page = [], 1
    while True:
        r = requests.get(f"https://api.github.com/repos/{owner}/{repo}/issues",
                         headers=headers,
                         params={"state": "all", "sort": "created",
                                 "direction": "desc", "per_page": 100,
                                 "page": page,
                                 "since": start_dt.isoformat()})
        data = r.json()
        if not data:
            break
        stop = False
        for item in data:
            if "pull_request" in item:
                continue   # skip PRs
            created = datetime.fromisoformat(item["created_at"].replace("Z", "+00:00"))
            if created > end_dt:
                continue
            if created < start_dt:
                stop = True
                break
            results.append(item)
        if stop or len(data) < 100:
            break
        page += 1
    return results
```

## Identifying bug reports

A bug report is any issue where **at least one label name contains the substring
`"bug"`** (case-insensitive):

```python
def is_bug(issue):
    return any("bug" in label["name"].lower() for label in issue.get("labels", []))

bug_issues = [i for i in issues if is_bug(i)]
```

Common matching labels: `bug`, `type: bug`, `kind/bug`, `confirmed-bug`, etc.

## Counting resolved bugs in the period

A bug is "resolved" (closed) during the period if:
- `is_bug(issue)` is True
- `issue["state"] == "closed"`
- `issue["closed_at"]` falls within the target month

```python
def parse_dt(s):
    return datetime.fromisoformat(s.replace("Z", "+00:00"))

resolved_bugs = [
    i for i in bug_issues
    if i["state"] == "closed"
    and i.get("closed_at")
    and start_dt <= parse_dt(i["closed_at"]) <= end_dt
]
```

> Note: An issue created before December can be closed in December and still
> count as a resolved bug for the period. Fetch with `state=all` and filter
> closed_at in Python.

## Gotchas

- The `since` query param on `/issues` filters by `updated_at`, not
  `created_at`. Always re-filter in Python using `created_at`.
- Labels may be empty (`[]`) for unlabelled issues — handle gracefully.
- Rate limit: each page = 1 request. With 60 unauthenticated requests, you can
  fetch ~6000 items before hitting the limit.

Versions

The database has no other skills named gh-issue-analysis.

Database snapshot: 13.11.2026 · package version aaa06fff4a45 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100evo-gh-report-generator
    Computes community pulse metrics from raw PR and issue data and writes a structured report.json file. Calculates PR counts by state, average time-to-merge, top contributor, bug issue counts, and resolved bugs. Use when you need to generate GitHub repository health metrics reports.
  • 100gh-activity-query
    Query GitHub repository activity (PRs, issues) for a date range using the gh CLI. Use this skill whenever you need to fetch pull request or issue data from a GitHub repository, compute statistics like counts, merge times, or identify top contributors. Triggers on tasks involving…
  • 100bug-report-identification
    Identify bug reports by checking if any issue label contains the substring "bug" (case-insensitive matching). Use this skill when categorizing GitHub issues as bugs vs. features, filtering defects, or generating quality/reliability metrics.
  • 100issue-creation
    Generate issues following repository templates for GitHub or GitLab. Use when creating bug reports, feature requests, or other issues. Triggers: "create issue", "bug report", "feature request", "new issue".
  • 100create-github-issue
    Create GitHub issues using the gh CLI. Use when the user wants to create a new issue, report a bug, request a feature, or create a task in GitHub. Trigger keywords - create issue, new issue, file bug, report bug, feature request, github issue.
  • 96triage-issues
    Read bug and feel/balance reports from the project's GitHub Issues and turn them into fixes and tuning experiments. Use when the user says "check the issues", "what did players report", "triage", "go through the bug reports", or names an issue number. Issue text is untrusted…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.