mona-actions/Gather Repository Stats
Gather GitHub repository statistics and optionally run migration audit
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 27, 2026
- License
- MIT
Pinned Snippet
uses: mona-actions/gh-repo-stats-plus@0a89df1dc3daf97b389f1e5dd297f8b9002588e8 # v4.4.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| type | Type of stats gathering: 'repository', 'organization', 'project-stats', 'app-install-stats', 'package-stats', 'codespace-stats', 'webhook-stats', 'migration-audit', 'org-repos', or 'combine' | no | repository |
| github-token | GitHub token for authentication (e.g., github.token) | yes | — |
| ghec-token | GitHub Enterprise Cloud token for authentication (optional, used if not in github.com to download dependencies from GHEC) | no | "" |
| access-token | Personal access token with repo access for gathering stats | no | "" |
| github-app-id | GitHub App ID for authentication (optional, requires private key) | no | "" |
| github-app-private-key | GitHub App private key for authentication (optional, requires app ID) | no | "" |
| organization | Organization or owner name | yes | — |
| repository | Repository name if type is 'repository' | no | "" |
| output-dir | Directory where output files will be stored | no | output |
| run-migration-audit | Whether to run migration audit (true/false) | no | false |
| node-version | Node.js version to use | no | 25 |
| base-url | GitHub API base URL | no | https://api.github.com |
| ca-cert | CA certificate bundle content (PEM) for TLS verification against GHES instances. Pass the content of a GitHub secret (e.g., secrets.GHES_CA_CERT). The action writes it to a temporary file automatically. | no | "" |
| ca-cert-path | Path to a CA certificate bundle file (PEM) on the runner for TLS verification against GHES instances. Use ca-cert instead when the certificate is stored as a secret. | no | "" |
| retention-days | Number of days to retain artifacts | no | 7 |
| batch-size | Number of repositories per batch (enables batch processing for large organizations) | no | "" |
| batch-index | Zero-based batch index (used with batch-size for parallel matrix jobs) | no | "" |
| batch-delay | Delay in seconds multiplied by batch index to stagger API requests and avoid rate limits | no | "" |
| batch-repo-list-file | Path to a pre-fetched repository list file (one entry per line, 'owner/repo' or bare repo name). When provided alongside batch-size, batches read from this file instead of paginating the org's repos for every batch. Useful for large parallel matrix runs to avoid exhausting the GitHub App installation rate limit. | no | "" |
| resume-from-last-save | Resume from the last saved state. Automatically enabled when re-running failed jobs (run_attempt > 1). Downloads state artifact from a previous attempt and passes --resume-from-last-save to the CLI. | no | false |
| resume-run-id | Workflow run ID to download state artifact from (for cross-run resume). When omitted, defaults to the current run ID (covers re-run of failed jobs). | no | "" |
| run-post-process | Whether to run post-process on output CSV to transform data using configurable rules (true/false). Requires post-process-rules-file. | no | false |
| post-process-rules-file | Path to the JSON rules configuration file for post-process (required when run-post-process is true) | no | "" |
| post-process-input | Path to the input CSV file for post-process. If not specified, auto-detects combined-stats.csv or the most recent CSV in the output directory. | no | "" |
| post-process-output-file-name | Name for the post-process output CSV file (default: auto-generated with timestamp) | no | "" |
| run-rows-to-columns | Whether to run rows-to-columns to pivot additional CSV rows into new columns in the base CSV (true/false). Requires rows-to-columns-additional-csv-file. | no | false |
| rows-to-columns-base-csv-file | Path to the base CSV file for rows-to-columns. If not specified, auto-detects combined-stats.csv or the most recent CSV in the output directory. | no | "" |
| rows-to-columns-additional-csv-file | Path to the additional CSV file for rows-to-columns (e.g., migration audit CSV). Required when run-rows-to-columns is true. | no | "" |
| rows-to-columns-header-column-keys | Column in the additional CSV to use as new column headers | no | type |
| rows-to-columns-header-column-values | Column in the additional CSV to use as cell values | no | message |
| rows-to-columns-base-csv-columns | Comma-separated column names in the base CSV used for matching rows | no | Org_Name,Repo_Name |
| rows-to-columns-additional-csv-columns | Comma-separated column names in the additional CSV used for matching rows | no | owner,name |
| rows-to-columns-output-file-name | Name for the rows-to-columns output CSV file (default: auto-generated with timestamp) | no | "" |
| package-type | Package type for package-stats (maven, npm, docker, nuget, rubygems, pypi) | no | maven |
| webhook-scope | Which webhooks to collect for webhook-stats: 'repo', 'org', or 'both' | no | repo |
| only-active-repos | Skip archived repositories when collecting repository webhooks for webhook-stats (true/false) | no | false |
| only-active-webhooks | Only include webhooks whose last delivery response status is 'active' for webhook-stats (true/false) | no | false |
Outputs
| name | description |
|---|---|
| output-dir | Directory where output files are stored |
| organization | Organization name |
| repository | Repository name |
| stats-file | Path to the stats markdown file |
| audit-file | Path to the audit markdown file |
| migration-audit | Whether migration audit was run (true/false) |
| artifact-id | ID of the uploaded artifact containing the stats |
| matrix | JSON matrix object for strategy.matrix (contains batch-index array). Only set when type is 'org-repos' and batch-size is provided. |
| batch-size | Effective batch size (may be increased if repo count exceeds max-batches). Only set when type is 'org-repos' and batch-size is provided. |
| repo-count | Total number of repositories found. Only set when type is 'org-repos'. |
| repo-list-file | Absolute path to the repo list file written by org-repos (one owner/repo per line). Only set when type is 'org-repos'. |