tools: add org-wide CI status report - #4439
Open
evenstensberg wants to merge 1 commit into
Open
Conversation
Add a script that reports the CI health of every repository in a GitHub organisation on its default branch, so the state of the whole org can be seen at a glance instead of opening each repository in turn. The checks are deliberately conservative: a repository is only reported green when that could actually be verified. API errors, truncated check-run pages, conclusions the script does not model, and commits that active workflows never ran on are all reported as unverified rather than rounded up to a pass. Dependabot "dynamic/" runs are excluded by default since they are not the project's own CI, superseded check runs and workflow runs are collapsed to the newest attempt, and every request is pinned to the head SHA resolved up front so a push landing mid-scan cannot mix results from two commits. Repositories are scanned in parallel with each worker writing its own result file, so the closing summary is computed from complete data and a worker that dies is counted as unverified instead of disappearing. Behaviour is tunable through ORG, INCLUDE_ARCHIVED, INCLUDE_FORKS, CANCELLED_IS_FAIL, INCLUDE_DYNAMIC_RUNS, JOBS and REPO_LIMIT; the exit status is 0 only when every scanned repository was verified green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! Implemented this in webpack to better improve our CI's while having overview that most of our repositories are healthy. Thought it is useful for node as well. I know there's probably a lot of changes needing to be iterated on, e.g documentation of this script + symlinking or similar. Happy to re-iterate until it's good enough to be useful for you.
AI description 👇🏽
Add a script that reports the CI health of every repository in a GitHub organisation on its default branch, so the state of the whole org can be seen at a glance instead of opening each repository in turn.
The checks are deliberately conservative: a repository is only reported green when that could actually be verified. API errors, truncated check-run pages, conclusions the script does not model, and commits that active workflows never ran on are all reported as unverified rather than rounded up to a pass. Dependabot "dynamic/" runs are excluded by default since they are not the project's own CI, superseded check runs and workflow runs are collapsed to the newest attempt, and every request is pinned to the head SHA resolved up front so a push landing mid-scan cannot mix results from two commits.
Repositories are scanned in parallel with each worker writing its own result file, so the closing summary is computed from complete data and a worker that dies is counted as unverified instead of disappearing. Behaviour is tunable through ORG, INCLUDE_ARCHIVED, INCLUDE_FORKS, CANCELLED_IS_FAIL, INCLUDE_DYNAMIC_RUNS, JOBS and REPO_LIMIT; the exit status is 0 only when every scanned repository was verified green.