chore(labels): add dry-run label audit script#423
Merged
Conversation
Add a read-only Ruby script that consumes lib/labels.yml and reports missing, mismatched, legacy, and unknown labels across one or more repositories. Document the dry-run step in the label maintenance runbook.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a read-only audit tool to compare the canonical org label set (lib/labels.yml) against live GitHub repos, plus runbook guidance to run the audit before doing any label cleanup/sync work.
Changes:
- Introduces
scripts/labels-dry-run.rbto report missing, mismatched, legacy, and unknown labels without applying mutations. - Extends
runbooks/labels.mdwith a “dry-run first” step and usage examples for Markdown/JSON output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
scripts/labels-dry-run.rb |
New Ruby CLI that queries labels via gh and diffs them against lib/labels.yml, outputting Markdown or JSON. |
runbooks/labels.md |
Documents the new dry-run workflow and provides invocation examples. |
Member
Author
|
@copilot check if conversations resolved |
Contributor
Yes, all four threads are resolved in c0ec437:
|
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.
Summary
scripts/labels-dry-run.rbaudit script that consumeslib/labels.ymlrunbooks/labels.mdValidation
ruby -c scripts/labels-dry-run.rbscripts/labels-dry-run.rb --repo z-shell/.github --include-cleanscripts/labels-dry-run.rb --repo z-shell/ziz-shell/.githubNotes
Refs #411