mona-actions/Gather Repository Stats

Gather GitHub repository statistics and optionally run migration audit

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 27, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: mona-actions/gh-repo-stats-plus@0a89df1dc3daf97b389f1e5dd297f8b9002588e8 # v4.4.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
typeType of stats gathering: 'repository', 'organization', 'project-stats', 'app-install-stats', 'package-stats', 'codespace-stats', 'webhook-stats', 'migration-audit', 'org-repos', or 'combine'norepository
github-tokenGitHub token for authentication (e.g., github.token)yes
ghec-tokenGitHub Enterprise Cloud token for authentication (optional, used if not in github.com to download dependencies from GHEC)no""
access-tokenPersonal access token with repo access for gathering statsno""
github-app-idGitHub App ID for authentication (optional, requires private key)no""
github-app-private-keyGitHub App private key for authentication (optional, requires app ID)no""
organizationOrganization or owner nameyes
repositoryRepository name if type is 'repository'no""
output-dirDirectory where output files will be storednooutput
run-migration-auditWhether to run migration audit (true/false)nofalse
node-versionNode.js version to useno25
base-urlGitHub API base URLnohttps://api.github.com
ca-certCA 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-pathPath 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-daysNumber of days to retain artifactsno7
batch-sizeNumber of repositories per batch (enables batch processing for large organizations)no""
batch-indexZero-based batch index (used with batch-size for parallel matrix jobs)no""
batch-delayDelay in seconds multiplied by batch index to stagger API requests and avoid rate limitsno""
batch-repo-list-filePath 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-saveResume 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.nofalse
resume-run-idWorkflow 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-processWhether to run post-process on output CSV to transform data using configurable rules (true/false). Requires post-process-rules-file.nofalse
post-process-rules-filePath to the JSON rules configuration file for post-process (required when run-post-process is true)no""
post-process-inputPath 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-nameName for the post-process output CSV file (default: auto-generated with timestamp)no""
run-rows-to-columnsWhether 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.nofalse
rows-to-columns-base-csv-filePath 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-filePath 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-keysColumn in the additional CSV to use as new column headersnotype
rows-to-columns-header-column-valuesColumn in the additional CSV to use as cell valuesnomessage
rows-to-columns-base-csv-columnsComma-separated column names in the base CSV used for matching rowsnoOrg_Name,Repo_Name
rows-to-columns-additional-csv-columnsComma-separated column names in the additional CSV used for matching rowsnoowner,name
rows-to-columns-output-file-nameName for the rows-to-columns output CSV file (default: auto-generated with timestamp)no""
package-typePackage type for package-stats (maven, npm, docker, nuget, rubygems, pypi)nomaven
webhook-scopeWhich webhooks to collect for webhook-stats: 'repo', 'org', or 'both'norepo
only-active-reposSkip archived repositories when collecting repository webhooks for webhook-stats (true/false)nofalse
only-active-webhooksOnly include webhooks whose last delivery response status is 'active' for webhook-stats (true/false)nofalse
namedescription
output-dirDirectory where output files are stored
organizationOrganization name
repositoryRepository name
stats-filePath to the stats markdown file
audit-filePath to the audit markdown file
migration-auditWhether migration audit was run (true/false)
artifact-idID of the uploaded artifact containing the stats
matrixJSON matrix object for strategy.matrix (contains batch-index array). Only set when type is 'org-repos' and batch-size is provided.
batch-sizeEffective batch size (may be increased if repo count exceeds max-batches). Only set when type is 'org-repos' and batch-size is provided.
repo-countTotal number of repositories found. Only set when type is 'org-repos'.
repo-list-fileAbsolute path to the repo list file written by org-repos (one owner/repo per line). Only set when type is 'org-repos'.