Skip to content

fix: auto-create required labels during compliance audit#67

Merged
don-petry merged 1 commit intomainfrom
claude/issue-46-20260406-0342
Apr 6, 2026
Merged

fix: auto-create required labels during compliance audit#67
don-petry merged 1 commit intomainfrom
claude/issue-46-20260406-0342

Conversation

@claude
Copy link
Copy Markdown
Contributor

@claude claude Bot commented Apr 6, 2026

Summary

  • Adds ensure_required_labels() to scripts/compliance-audit.sh — all 6 required labels (security, dependencies, scorecard, bug, enhancement, documentation) are idempotently created on every audit run using gh label create --force
  • Adds apply_labels() to scripts/apply-repo-settings.sh so the remediation script covers labels alongside repository merge settings
  • Both functions use the colors and descriptions defined in standards/github-settings.md#labels--standard-set

Why

The compliance audit was repeatedly filing missing-label-dependencies (and potentially other missing-label-*) issues because there was no mechanism to auto-create the required labels. By creating them during the audit itself, the finding category is self-healing and won't recur.

Test plan

  • Verify scripts/compliance-audit.sh syntax is valid (bash -n)
  • Verify scripts/apply-repo-settings.sh syntax is valid (bash -n)
  • Run a dry-run audit and confirm no missing-label-* findings remain after labels are created
  • Run ./scripts/apply-repo-settings.sh <repo> and confirm labels are created in the target repo

Closes #46

Generated with Claude Code

… apply

Adds ensure_required_labels() to compliance-audit.sh so all 6 required
labels (security, dependencies, scorecard, bug, enhancement, documentation)
are idempotently created during each audit run, eliminating the
missing-label-* compliance finding category.

Also extends apply-repo-settings.sh with apply_labels() so the remediation
script covers labels alongside repository settings.

Closes #46

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

@don-petry don-petry merged commit 36274b8 into main Apr 6, 2026
17 checks passed
@don-petry don-petry deleted the claude/issue-46-20260406-0342 branch April 6, 2026 11:47
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-dependencies

1 participant