fix: auto-create missing required labels during compliance audit#64
Closed
claude[bot] wants to merge 2 commits intomainfrom
Closed
fix: auto-create missing required labels during compliance audit#64claude[bot] wants to merge 2 commits intomainfrom
claude[bot] wants to merge 2 commits intomainfrom
Conversation
- Add REQUIRED_LABEL_SPECS array with name, color, and description for each standard label - Modify check_labels() in compliance-audit.sh to auto-create missing labels via `gh label create`, falling back to filing a finding only if creation fails - Add apply_labels() to apply-repo-settings.sh so the remediation script also ensures all standard labels exist - Remove now-unused REQUIRED_LABELS array from compliance-audit.sh Closes #47 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
When DRY_RUN=true, check_labels() should not modify the repository. Instead, file a finding (as before) so dry run output still shows what would be changed. Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Contributor
5 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.



Summary
REQUIRED_LABEL_SPECSarray (name, color, description) to bothcompliance-audit.shandapply-repo-settings.shcheck_labels()incompliance-audit.shnow auto-creates missing labels withgh label create --forcerather than just filing a finding; only falls back to a finding if creation failsapply-repo-settings.shgains a newapply_labels()function that ensures all standard labels exist, called automatically alongsideapply_settings()REQUIRED_LABELSarray fromcompliance-audit.shOn the next compliance audit run, the
scorecardlabel (and any other missing standard labels) will be auto-created rather than repeatedly filing open issues.Closes #47
Generated with Claude Code