Skill files1 file
SKILL.md141 lines
1
---
2
name: 'OSPO Contributors Report'
3
description: 'Monthly contributor activity metrics across an organization''s repositories.'
4
labels: ['ospo', 'reporting', 'contributors']
5
on:
6
schedule:
7
- cron: "3 2 1 * *"
8
workflow_dispatch:
9
inputs:
10
organization:
11
description: "GitHub organization to analyze (e.g. github)"
12
required: false
13
type: string
14
repositories:
15
description: "Comma-separated list of repos to analyze (e.g. owner/repo1,owner/repo2)"
16
required: false
17
type: string
18
start_date:
19
description: "Start date for the report period (YYYY-MM-DD)"
20
required: false
21
type: string
22
end_date:
23
description: "End date for the report period (YYYY-MM-DD)"
24
required: false
25
type: string
26
sponsor_info:
27
description: "Include GitHub Sponsors information for contributors"
28
required: false
29
type: boolean
30
default: false
31
32
permissions:
33
contents: read
34
issues: read
35
pull-requests: read
36
37
engine: copilot
38
39
tools:
40
github:
41
toolsets:
42
- repos
43
- issues
44
- pull_requests
45
- orgs
46
- users
47
bash: true
48
49
safe-outputs:
50
create-issue:
51
max: 1
52
title-prefix: "[Contributors Report] "
53
54
timeout-minutes: 60
55
---
56
57
# Contributors Report
58
59
Generate a contributors report for the specified organization or repositories.
60
61
## Step 1: Validate Configuration
62
63
Check the workflow inputs. Either `organization` or `repositories` must be provided.
64
65
- If **both** are empty and this is a **scheduled run**, default to analyzing all public repositories in the organization that owns the current repository. Determine the org from the `GITHUB_REPOSITORY` environment variable (the part before the `/`).
66
- If **both** are empty and this is a **manual dispatch**, fail with a clear error message: "You must provide either an organization or a comma-separated list of repositories."
67
- If **both** are provided, prefer `repositories` and ignore `organization`.
68
69
## Step 2: Determine Date Range
70
71
- If `start_date` and `end_date` are provided, use them.
72
- Otherwise, default to the **previous calendar month**. For example, if today is 2025-03-15, the range is 2025-02-01 to 2025-02-28.
73
- Use bash to compute the dates if needed. Store them as `START_DATE` and `END_DATE`.
74
75
## Step 3: Enumerate Repositories
76
77
- If `repositories` input was provided, split the comma-separated string into a list. Each entry should be in `owner/repo` format.
78
- If `organization` input was provided (or defaulted from Step 1), list all **public, non-archived, non-fork** repositories in the organization using the GitHub API. Collect their `owner/repo` identifiers.
79
80
## Step 4: Collect Contributors from Commit History
81
82
For each repository in scope:
83
84
1. Use the GitHub API to list commits between `START_DATE` and `END_DATE` (use the `since` and `until` parameters on the commits endpoint).
85
2. For each commit, extract the **author login** (from `author.login` on the commit object).
86
3. **Exclude bot accounts**: skip any contributor whose username contains `[bot]` or whose `type` field is `"Bot"`.
87
4. Track per-contributor:
88
- Total number of commits across all repos.
89
- The set of repos they contributed to.
90
91
Use bash to aggregate and deduplicate the contributor data across all repositories.
92
93
## Step 5: Determine New vs Returning Contributors
94
95
For each contributor found in Step 4, check whether they have **any commits before `START_DATE`** in any of the in-scope repositories.
96
97
- If a contributor has **no commits before `START_DATE`**, mark them as a **New Contributor**.
98
- Otherwise, mark them as a **Returning Contributor**.
99
100
## Step 6: Collect Sponsor Information (Optional)
101
102
If the `sponsor_info` input is `true`:
103
104
1. For each contributor, check whether they have a GitHub Sponsors profile by querying the user's profile via the GitHub API.
105
2. If the user has sponsorship enabled, record their sponsor URL as `https://github.com/sponsors/<username>`.
106
3. If not, leave the sponsor field empty.
107
108
## Step 7: Generate Markdown Report
109
110
Build a markdown report with the following structure:
111
112
### Summary Table
113
114
| Metric | Value |
115
|---|---|
116
| Total Contributors | count |
117
| Total Contributions (Commits) | count |
118
| New Contributors | count |
119
| Returning Contributors | count |
120
| % New Contributors | percentage |
121
122
### Contributors Detail Table
123
124
Sort contributors by commit count descending.
125
126
| # | Username | Contribution Count | New Contributor | Sponsor URL | Commits |
127
|---|---|---|---|---|---|
128
| 1 | @username | 42 | Yes | [Sponsor](url) | [View](commits-url) |
129
130
- The **Username** column should link to the contributor's GitHub profile.
131
- The **Sponsor URL** column should show "N/A" if `sponsor_info` is false or the user has no Sponsors page.
132
- The **Commits** column should link to a filtered commits view.
133
134
## Step 8: Create Issue with Report
135
136
Create an issue in the **current repository** with:
137
138
- **Title:** `[Contributors Report] <ORG_OR_REPO_SCOPE> — START_DATE to END_DATE`
139
- **Body:** The full markdown report from Step 7.
140
- **Labels:** Add the label `contributors-report` if it exists; do not fail if it does not.
141

© 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…