Repository navigation
Manage the velnor-new release-tags ruleset and match live ruleset settings - #58
Merged
Merged
Conversation
…tings Adopt the release-tags ruleset created live for tailrocks/velnor-new#682 (owner-only creation of rust-ci-v*, velnor-ci-v*, and velnor-gen-v* tags) and the existing sdk-preview-owner-creation ruleset through a new per-repository tag_creation_rulesets option with import blocks. Reconcile drift between the live rulesets and this configuration so the next apply weakens nothing: velnor-new keeps strict required status checks and the protect-tags update rule, termpane keeps the update rule, and 17 repositories require DCO and Required, which their CI emits, instead of the retired Policy and ci-required contexts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
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
This PR brings the
release-tagsruleset under Terraform management. It was created live ontailrocks/velnor-newtoday as step I0, the interim fix for tailrocks/velnor-new#682. It also brings this configuration back in line with the live rulesets, so the owner's nexttofu applyimports the rulesets with no change and weakens no protection.What ships
tag_creation_rulesetsoption. Each entry is a tag ruleset with thecreationrule for itsincludepatterns and analwaysbypass for each user ID inbypass_user_ids.velnor-newdeclaresrelease-tags(refs/tags/rust-ci-v*,refs/tags/velnor-ci-v*,refs/tags/velnor-gen-v*, bypass user 139017) and the existingsdk-preview-owner-creation(refs/tags/sdk-preview-*, same bypass). Import blocks adopt live rulesets 27276267 and 26696396.strict_required_status_checksandprotect_tags_updateoptions. Both default tofalse, which keeps the current behavior for the other repositories.velnor_new_release_tags_reservedcheck that fails if the three patterns or the single-user bypass are removed.What this addresses
#682.
release-rust-ci-tools.ymlpublishes a release for anyrust-ci-v*tag, andprotect-tagsblocks deleting and moving tags but not creating them. A tag on an unmerged commit could therefore publish. The new ruleset lets only the owner create these tags. In the design's R11, thevelnor-releaseGitHub App replaces the owner bypass.Drift that an apply would have weakened. A read-only plan of
mainagainst the live state (empty local state, import blocks only) showed these changes:velnor-newprotect-main:strict_required_status_checks_policychanges fromtruetofalse.velnor-newandtermpaneprotect-tags: theupdaterule is removed.protect-mainreplaces the liveRequiredcheck withPolicyandci-required. The repositories are holla, holla-apt, homebrew-holla, homebrew-parallax, homebrew-ruxel, homebrew-tablerock, homebrew-velnor-legacy, parallax, parallax-telemetry-playground, pg-bigdecimal, ruxel, schemalane, tablerock, termrock, tracing-request-level, velnor-apt-legacy and velnor-legacy. The default-branch HEAD of each one reports aRequiredcheck run and neither of the other two checks, so an apply would have made every PR wait for checks that never arrive.This PR changes the configuration to match the live rulesets, using the new options and the new
dco_requiredcheck template.Not included
parallax"stable tag protection" (refs/tags/v*; creation, update, deletion and non-fast-forward rules; bypass for repository role 5) andrepo-scanprotect-repo-scan-release-tags(refs/tags/repo-scan-v*; deletion and update rules) stay unmanaged. An apply does not touch them.protect-mainrulesets setrequire_extra_approval_for_unattributed_changes: true. Provider 6.13.0 has no argument for it, so this module cannot manage it.tailrocks-asd-ste100-skillsis private, and its rulesets API returns 403 ("Upgrade to GitHub Pro"). The module still declares rulesets for it. This PR does not change that.Verify locally
Checkout
Static checks
Expected:
tofu validateprints "Success! The configuration is valid."Smoke
Expected:
tag_creation["velnor-new/release-tags"]andtag_creation["velnor-new/sdk-preview-owner-creation"]show "will be imported" with no in-place change. Noprotect_mainorprotect_tagsruleset shows an update. I ran the targeted form of this plan against an empty local state with the velnor-new, termpane, holla, velnor-legacy and velnor-lab rulesets as targets. Every ruleset was imported with no change.Migration notes
None. The import blocks adopt the two existing velnor-new tag rulesets on the next apply.
🤖 Generated with Claude Code