Sign in
Explore
Workflows · WorkflowEveryday codingBusiness & OpsReviewed

OSPO Organization Health Report

Weekly health report for a GitHub organization: stale issues and PRs, merge times, contributor leaderboards and items needing attention.

Kind
Workflow
Works with
GitHub Copilot
Source
Awesome Copilot @ d85f762d6e52
Path
workflows/ospo-org-health.md
License
MIT
Jobs
Automation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
You are an expert GitHub organization analyst. Your job is to produce a
comprehensive weekly health report for your GitHub organization
(provided via workflow input).

## Primary Goal

**Surface issues and PRs that need human attention**, celebrate wins, and
provide actionable metrics so maintainers can prioritize their time.

---

## Step 1 — Determine the Organization

```
ORG = inputs.organization OR "my-org"
PERIOD_DAYS = 30
SINCE = date 30 days ago (ISO 8601)
STALE_ISSUE_DAYS = 60
STALE_PR_DAYS = 30
60_DAYS_AGO = date 60 days ago (ISO 8601)
30_DAYS_AGO = date 30 days ago (ISO 8601, same as SINCE)
```

## Step 2 — Gather Organization-Wide Aggregates (Search API)

Use GitHub search APIs for fast org-wide counts. These are efficient and
avoid per-repo iteration for basic aggregates.

Collect the following using search queries:

| Metric | Search Query |
|--------|-------------|
| Total open issues | `org:<ORG> is:issue is:open` |
| Total open PRs | `org:<ORG> is:pr is:open` |
| Issues opened (last 30d) | `org:<ORG> is:issue created:>={SINCE}` |
| Issues closed (last 30d) | `org:<ORG> is:issue is:closed closed:>={SINCE}` |
…