Repository navigation
Make a fresh-clone plan contain only imports - #59
Merged
Merged
Conversation
Import the terminal-components-claude rulesets, stop declaring rulesets for private repositories, and skip settings for archived repositories. Co-Authored-By: Claude Sonnet 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.
A fresh-clone plan showed
140 to import, 4 to add, 4 to change, 0 to destroy. This PR removes the add and change entries.Causes and fixes
terminal-components-claudehas live rulesetsprotect-main(24883153) andprotect-tags(24883130) with noimportblocks, so the plan would create them. Added both blocks toimports.tf.tailrocks-asd-ste100-skillsis private, and its rulesets API returns 403 ("Upgrade to GitHub Pro") on the free plan, so the two creations would fail. The module now declaresprotect-main,protect-tagsand tag-creation rulesets only for repositories withvisibility = "public". The inventory entry carries a note saying why. Because the rule is based on visibility, any future private repository behaves the same way.homebrew-velnor-legacy,velnor-actions-fixture-legacy,velnor-apt-legacyandvelnor-legacyare archived, and GitHub refuses changes to them. The inventory has a newarchivedfield (defaultfalse), set on those four. The module createsgithub_repository.managed_settingsonly for non-archived entries. For archived ones it reads the repository through agithub_repositorydata source. This keeps the repository IDs that thevelnor-trustedrunner group needs, and nothing is written. Their rulesets stay managed and importable, because the plan showed no changes for them. The four settingsimportblocks and the four settingsmovedblocks are removed. No repository is unarchived or destroyed.Affected resources
protect_main["terminal-components-claude"],protect_tags["terminal-components-claude"].protect_main["tailrocks-asd-ste100-skills"],protect_tags["tailrocks-asd-ste100-skills"](creates).managed_settingsof the four archived repositories (their settings imports are also removed).Verification
tofu fmt -check -recursiveandtofu validatepass with the pinned OpenTofu 1.13.1./tmp/tailrocks-tofu-plan.log.Expected result
The next fresh plan should show only
138 to import, 0 to add, 0 to change, 0 to destroy(140 - 4 archived settings imports + 2 new ruleset imports).🤖 Generated with Claude Code