chore(labels): rename label sync entrypoint#427
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes the label synchronization tooling by introducing scripts/labels-sync.rb as the canonical entrypoint, keeping scripts/labels-dry-run.rb as a compatibility wrapper, and updating documentation/tests to reflect the new naming.
Changes:
- Add
scripts/labels-sync.rbas the main label audit/sync script (with guarded apply-mode). - Convert
scripts/labels-dry-run.rbinto a compatibility wrapper that loadslabels-sync.rb. - Update the labels runbook and smoke tests to use/validate the new canonical entrypoint while ensuring the old entrypoint still works.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/test-labels-dry-run.sh | Switch smoke tests to target labels-sync.rb and also syntax-check the compatibility wrapper. |
| scripts/labels-sync.rb | New canonical entrypoint implementing label drift auditing and guarded apply/preview modes. |
| scripts/labels-dry-run.rb | Replace the old implementation with a compatibility wrapper that loads labels-sync.rb. |
| runbooks/labels.md | Update runbook examples and guidance to reference scripts/labels-sync.rb as canonical. |
- Use $PROGRAM_NAME for OptionParser banner instead of hardcoded path - Exit nonzero when apply_failed is true in Markdown output mode - Handle error hashes (operation/label/message) in print_label_list - Use fully qualified scripts/labels-sync.rb path in runbook Agent-Logs-Url: https://github.com/z-shell/.github/sessions/ac60f0f2-823b-4fbe-bea4-e534fb8ad623 Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com>
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-sync.rbas the canonical label sync entrypointscripts/labels-dry-run.rbas a compatibility wrapper for existing commandslabels-sync.rbTest Plan
ruby -c scripts/labels-sync.rbruby -c scripts/labels-dry-run.rbscripts/test-labels-dry-run.shscripts/labels-sync.rb --repo z-shell/.github --apply --include-cleanscripts/labels-sync.rb --repo z-shell/.github --apply --confirm-apply --include-cleanscripts/labels-sync.rb --repo z-shell/.github --include-cleanRefs #411.