Skip to content

fix(apply-rulesets): use Tier 1 reusable check names#94

Merged
don-petry merged 1 commit intomainfrom
fix/apply-rulesets-tier1-check-names
Apr 8, 2026
Merged

fix(apply-rulesets): use Tier 1 reusable check names#94
don-petry merged 1 commit intomainfrom
fix/apply-rulesets-tier1-check-names

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

@don-petry don-petry commented Apr 8, 2026

Closes #91.

scripts/apply-rulesets.sh previously composed claude.yml's required check name as <workflow-display-name> / claude (e.g. Claude Code / claude). GitHub actually publishes reusable check names as <caller-job-id> / <reusable-job-id-or-name>claude-code / claude. The old format never matched real checks, which is why petry-projects/markets#78 and petry-projects/bmad-bgreat-suite#78 deadlocked yesterday.

Changes

  • Drop the legacy claude.yml block from build_required_status_checks.
  • Add the centralized workflows that ARE safe to require:
    • agent-shield / AgentShield
    • dependency-audit / Detect ecosystems
  • Document why the others (claude-code, per-ecosystem audit jobs, dependabot-*, feature-ideation) are intentionally NOT required.

Test plan

  • bash -n and shellcheck clean
  • CI on this branch
  • After merge, manually run apply-rulesets.sh against each petry-projects repo to converge

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated automated status check requirements to enforce new security and dependency audit workflows.

Closes #91.

`scripts/apply-rulesets.sh` previously only knew about claude.yml,
sonarcloud.yml, codeql.yml, and ci.yml when building required-status-
checks lists. For claude.yml it composed `<workflow-display-name> /
claude` (e.g. "Claude Code / claude") — but GitHub actually publishes
reusable check names as `<caller-job-id> / <reusable-job-id-or-name>`,
which is "claude-code / claude". The old format never matched real
checks, so the rule was effectively never satisfied — which is why
markets and bmad-bgreat-suite deadlocked at merge time after #87.

Fix:
- Drop the legacy claude.yml block.
- Hardcode the new check names for the centralized workflows that ARE
  safe to require: `agent-shield / AgentShield` and
  `dependency-audit / Detect ecosystems`.
- Document why claude-code / claude, the per-ecosystem dependency-audit
  jobs, dependabot-{automerge,rebase}, and feature-ideation are NOT
  required: claude-code's app-token validation deadlocks workflow PRs;
  per-ecosystem jobs report SKIPPED when their lockfile is absent and
  required-but-skipped fails the gate; the dependabot/feature-ideation
  jobs run on triggers other than regular PRs.

After this lands, run `apply-rulesets.sh` against every petry-projects
repo to converge on the new names.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 16:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51c56cd0-0688-4815-8525-7a413228971f

📥 Commits

Reviewing files that changed from the base of the PR and between 67cb057 and 0094248.

📒 Files selected for processing (1)
  • scripts/apply-rulesets.sh

📝 Walkthrough

Walkthrough

Modified scripts/apply-rulesets.sh to replace dynamic claude.yml check name generation with hardcoded tier-1 centralized workflow detection. Added support for agent-shield.yml and dependency-audit.yml with fixed check name mappings, and introduced explicit exclusions for non-required checks.

Changes

Cohort / File(s) Summary
Script logic updates
scripts/apply-rulesets.sh
Replaced dynamic claude.yml handling with hardcoded tier-1 workflow mappings: agent-shield.ymlagent-shield / AgentShield, dependency-audit.ymldependency-audit / Detect ecosystems. Added explicit exclusions for claude-code / claude, dependabot-automerge / dependabot-rebase, and feature-ideation checks to prevent incorrect requirement enforcement.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: replacing dynamic claude.yml logic with hardcoded Tier 1 check names following GitHub's correct naming convention.
Linked Issues check ✅ Passed The changes fully implement all coding requirements from issue #91: correct check name format, handle Tier 1 workflows, document exclusions, and remove legacy logic.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue #91 requirements: fixing check names in detect_required_checks and handling Tier 1 workflows.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/apply-rulesets-tier1-check-names

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2026

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

Updates the org ruleset application script to require only the Tier 1 reusable workflow checks whose published check contexts are stable and safe to gate merges on, avoiding deadlocks caused by mismatched reusable-workflow check names.

Changes:

  • Removes the legacy claude.yml required-check composition logic (workflow display name–based) from required check detection.
  • Adds required check contexts for Tier 1 centralized workflows that are safe to require (agent-shield / AgentShield, dependency-audit / Detect ecosystems).
  • Documents why other centralized workflows are intentionally not required (e.g., claude-code, conditional per-ecosystem audits, dependabot-* and scheduled workflows).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/apply-rulesets.sh
@don-petry don-petry merged commit 07ca6ff into main Apr 8, 2026
24 checks passed
@don-petry don-petry deleted the fix/apply-rulesets-tier1-check-names branch April 8, 2026 17:01
don-petry added a commit to petry-projects/ContentTwin that referenced this pull request Apr 18, 2026
Bring setup-rulesets.sh in sync with the live code-quality ruleset:
- Add CodeQL, Lint, and Format to required_status_checks
- Set strict_required_status_checks_policy to true
- Explicitly exclude claude-code / claude (comment explains the deadlock
  it causes on workflow-modifying PRs per petry-projects/.github#94)

Closes #81

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
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.

apply-rulesets.sh: handle Tier 1 reusable check names

2 participants