Skip to content

chore(labels): rename label sync entrypoint#427

Merged
ss-o merged 3 commits into
mainfrom
chore/rename-label-sync-entrypoint
May 23, 2026
Merged

chore(labels): rename label sync entrypoint#427
ss-o merged 3 commits into
mainfrom
chore/rename-label-sync-entrypoint

Conversation

@ss-o
Copy link
Copy Markdown
Member

@ss-o ss-o commented May 23, 2026

Summary

  • add scripts/labels-sync.rb as the canonical label sync entrypoint
  • keep scripts/labels-dry-run.rb as a compatibility wrapper for existing commands
  • update the labels runbook examples to use labels-sync.rb
  • update smoke tests to verify both the canonical and compatibility entrypoints

Test Plan

  • ruby -c scripts/labels-sync.rb
  • ruby -c scripts/labels-dry-run.rb
  • scripts/test-labels-dry-run.sh
  • scripts/labels-sync.rb --repo z-shell/.github --apply --include-clean
  • scripts/labels-sync.rb --repo z-shell/.github --apply --confirm-apply --include-clean
  • scripts/labels-sync.rb --repo z-shell/.github --include-clean

Refs #411.

@ss-o ss-o requested a review from a team as a code owner May 23, 2026 04:09
Copilot AI review requested due to automatic review settings May 23, 2026 04:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rb as the main label audit/sync script (with guarded apply-mode).
  • Convert scripts/labels-dry-run.rb into a compatibility wrapper that loads labels-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.

Comment thread scripts/labels-sync.rb
Comment thread scripts/labels-sync.rb
Comment thread scripts/labels-sync.rb Outdated
Comment thread runbooks/labels.md Outdated
- 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>
Copilot finished work on behalf of ss-o May 23, 2026 04:17
@ss-o ss-o merged commit 8b0feba into main May 23, 2026
4 checks passed
@ss-o ss-o deleted the chore/rename-label-sync-entrypoint branch May 23, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants