Repository navigation
Repair script: make stored labels match GitHub - #525
Merged
Merged
Conversation
Jarred wants the stored labels clean after past renames, not only the 20 renames the dry run proposed. --apply now: - renames a stale label's row on each item that carries the new name on GitHub (checked item by item, so a wrong guess renames nothing), and drops it from items that don't - drops every row of a label with no new name: GitHub takes a deleted label off every item - keeps a row cut to pull_labels.title's 32 characters whose full label still exists (AppV2 "needs-further information collec") The new name is now a vote across the sampled items instead of an intersection, which one item with a missed labeled event emptied, and two old labels may share one new name: per-item checks make that safe. GitHub calls wait 1.5s each, since the board shares the token's quota. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks
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.
🤖
After past label renames, Pulldasher still stored about 190 labels that their repos no longer have, and Jarred asked for the stored labels to match GitHub. The script used to fix only the 20 renames it was sure of. This version cleans up the rest:
pull_labels.titleholds 32) is kept.The new name is now the one most of the sampled items carry, instead of one all of them must carry. One item missing a stored label used to empty the whole set. Each GitHub call waits 1.5s, because the board shares the token's hourly quota and I used it up earlier today with four prod restarts.
This version already ran on prod from a one-off container of the prod image, with a JSON backup of the four tables it touches saved first (
~/pd-logs/backup-labels-1791698471.jsonon cominor).🤖 Generated with Claude Code