OSPO Stale Repository Report

OSPO Stale Repository Report

Runs a scheduled workflow that scans an organization's GitHub repositories for inactivity, applies exemptions and files an archival recommendation report as an issue.

Skill files1 file
SKILL.md120 lines
1
---
2
name: 'OSPO Stale Repository Report'
3
description: 'Identifies inactive repositories in your organization and generates an archival recommendation report.'
4
labels: ['ospo', 'maintenance', 'stale-repos']
5
on:
6
schedule:
7
- cron: "3 2 1 * *"
8
workflow_dispatch:
9
inputs:
10
organization:
11
description: "GitHub organization to scan"
12
required: true
13
type: string
14
default: "my-org"
15
inactive_days:
16
description: "Number of days of inactivity before a repo is considered stale"
17
required: false
18
type: number
19
default: 365
20
exempt_repos:
21
description: "Comma-separated list of repos to exempt from the report"
22
required: false
23
type: string
24
default: ""
25
exempt_topics:
26
description: "Comma-separated list of topics — repos with any of these topics are exempt"
27
required: false
28
type: string
29
default: ""
30
activity_method:
31
description: "Method to determine last activity"
32
required: false
33
type: choice
34
options:
35
- pushed
36
- default_branch_updated
37
default: pushed
38
39
permissions:
40
contents: read
41
issues: read
42
43
engine: copilot
44
tools:
45
github:
46
toolsets:
47
- repos
48
- issues
49
bash: true
50
51
safe-outputs:
52
create-issue:
53
max: 1
54
title-prefix: "[Stale Repos] "
55
labels:
56
- stale-repos
57
58
timeout-minutes: 30
59
---
60
61
You are an assistant that audits GitHub repositories for staleness.
62
63
## Inputs
64
65
| Input | Default |
66
|---|---|
67
| `organization` | `my-org` |
68
| `inactive_days` | `365` |
69
| `exempt_repos` | _(none)_ |
70
| `exempt_topics` | _(none)_ |
71
| `activity_method` | `pushed` |
72
73
Use the workflow dispatch inputs if provided; otherwise fall back to the defaults above.
74
75
## Instructions
76
77
### 1. Enumerate repositories
78
79
List **all** repositories in the `organization`. Exclude any repo that is:
80
81
- **Archived** — skip it entirely.
82
- **Listed in `exempt_repos`** — compare repo names (case-insensitive) against the comma-separated list.
83
- **Tagged with an exempt topic** — if the repo has any topic that appears in the comma-separated `exempt_topics` list, skip it.
84
85
### 2. Determine last activity date
86
87
For each remaining repo, determine the **last activity date** based on `activity_method`:
88
89
- **`pushed`** — use the repository's `pushed_at` timestamp (this is the default and most efficient method).
90
- **`default_branch_updated`** — fetch the most recent commit on the repo's default branch and use that commit's `committer.date`.
91
92
### 3. Identify stale repos
93
94
Calculate the number of days between the last activity date and **today**. If the number of days exceeds `inactive_days`, mark the repo as **stale**.
95
96
### 4. Generate report
97
98
Build a **Markdown report** with a summary and a table:
99
100
> **Stale Repository Report — \<date\>**
101
> Found **N** repositories with no activity in the last **inactive_days** days.
102
103
| Repository | Days Inactive | Last Push Date | Visibility |
104
|---|---|---|---|
105
| [owner/repo](https://github.com/owner/repo) | 420 | 2024-01-15 | public |
106
107
Sort the table by **Days Inactive** descending (most stale first).
108
109
If there are **no stale repos**, still create the issue but note that all repositories are active.
110
111
### 5. Create or update issue
112
113
Search for an existing **open** issue in the `organization/.github` repo (or the repo this workflow runs in) with the label `stale-repos` and a title starting with `[Stale Repos]`.
114
115
- If an **existing open issue** is found, **update its body** with the new report.
116
- If **no open issue** exists, **create a new issue** with:
117
- Title: `[Stale Repos] Inactive Repository Report — <date>`
118
- Label: `stale-repos`
119
- Body: the full Markdown report from step 4.
120

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…