fix: Refactor tag protection resources #69
Merged
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.
This PR refactors the Tag Protection resources.
The old tag protection is deprecated and is replaced with Rulesets:
Error: POST https://api.github.com/repos/connectedbrewery/nldevoc-sandbox-wspaargaren/tags/protection: 410 This is a scheduled brownout of the tag protections API. Tag protections will be fully deprecated on 2024-08-30. At that point, this API endpoint will be removed. Please use tag rulesets instead. []
This PR changes the resource from
github_repository_tag_protection
togithub_repository_ruleset
while keeping the functionality intact. The refactor is based on theexport to ruleset
outcome from Github itself:On purpose made it a 1-on-1 refactor without implementing any specific ruleset features so this can be a patch version. Since it currently is completely broken this allows for a smooth update.
See also: https://github.blog/changelog/2024-05-29-sunset-notice-tag-protections/