Skip to content

fix: auto-create missing required labels during compliance audit#64

Closed
claude[bot] wants to merge 2 commits intomainfrom
claude/issue-47-20260406-0342
Closed

fix: auto-create missing required labels during compliance audit#64
claude[bot] wants to merge 2 commits intomainfrom
claude/issue-47-20260406-0342

Conversation

@claude
Copy link
Copy Markdown
Contributor

@claude claude Bot commented Apr 6, 2026

Summary

  • Adds REQUIRED_LABEL_SPECS array (name, color, description) to both compliance-audit.sh and apply-repo-settings.sh
  • check_labels() in compliance-audit.sh now auto-creates missing labels with gh label create --force rather than just filing a finding; only falls back to a finding if creation fails
  • apply-repo-settings.sh gains a new apply_labels() function that ensures all standard labels exist, called automatically alongside apply_settings()
  • Removes the now-unused REQUIRED_LABELS array from compliance-audit.sh

On the next compliance audit run, the scorecard label (and any other missing standard labels) will be auto-created rather than repeatedly filing open issues.

Closes #47

Generated with Claude Code

- 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>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

@don-petry
Copy link
Copy Markdown
Contributor

Closing — superseded by #67 which takes a cleaner approach (separate ensure_required_labels function vs modifying the audit check itself). Both achieve label auto-creation; #67 better separates remediation from detection.

@don-petry don-petry closed this Apr 6, 2026
@don-petry don-petry deleted the claude/issue-47-20260406-0342 branch April 6, 2026 11:48
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.

Compliance: missing-label-scorecard

1 participant