Skip to content

fix: filter _has_restrict_updates_ruleset for update rule type - #25

Merged
max-sixty merged 1 commit into
mainfrom
fix/ruleset-false-positive
Mar 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ruleset-false-positive

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Summary

  • Filter _has_restrict_updates_ruleset jq query for type == "update" rules, preventing false positives from non-update rulesets (e.g., required_status_checks)
  • Add regression tests for both positive (update ruleset detected) and negative (non-update ruleset ignored) cases

Test plan

  • New test test_non_update_ruleset_is_not_detected verifies the false positive is fixed
  • New test test_update_ruleset_is_detected verifies correct detection still works
  • All new tests pass

Fixes #23

🤖 Generated with Claude Code

The function checked for any active branch-targeting ruleset, but didn't
verify the ruleset contains a `type: "update"` rule. A repo with only a
`required_status_checks` ruleset would incorrectly pass the merge
restriction check.

Fixes #23

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty
max-sixty merged commit 84ca3d5 into main Mar 25, 2026
1 check passed
@max-sixty
max-sixty deleted the fix/ruleset-false-positive branch March 25, 2026 23:42
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.

fix: _has_restrict_updates_ruleset false positive on non-update rulesets

2 participants