This script generates a Markdown table summarizing a GitHub user's pull requests (PRs) — and optionally issues — contributed to repositories not owned by the user. It is useful for auditing open-source contributions beyond green squares or self-starred repos.
- Fetches pull requests (merged or all) made to others' repositories
- (Optional) Fetches issues opened in others' repositories
- Reports repository stats: stars, forks, watchers, open issues, contributors
- Outputs to a Markdown table file for easy sharing
| REPO | Stars | Forks | Watchers | Issues | Contributors | PRs (merged) | Issues (opened) |
|---|---|---|---|---|---|---|---|
| some1/repo | 42 | 7 | 12 | 5 | 9 | #123 | #456 |
| some2/repo | 5 | 0 | 1 | 3 | 2 | #789 #1001 |
- Bash (Unix-based OS)
curljq- A GitHub personal access token with
public_reposcope
bash generate_contrib_report.sh \
--token <your-github-token> \
--user <github-username> \
--filter merged \
--include-issues true \
--output <output-file>.md--token(required): Your GitHub personal access token--user(required): GitHub username to analyze--filter(optional):merged(default) orall--include-issues(optional):true(default) orfalse--output(optional): Output file name (default:<username>-report-YYYYMMDD.md)
bash generate_contrib_report.sh \
--token ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--user octocat \
--filter merged \
--include-issues true \
--output octocat-report.md- Only PRs and issues to repositories not owned by the user are included
- If
--include-issuesis set tofalse, the final column is omitted
This project is distributed under the terms of the GNU General Public Licence (GPL). For detailed licence terms, see the LICENSE file included in this distribution.