diff --git a/.github/workflows/reset_test_repo.yml b/.github/workflows/reset_test_repo.yml index 7f9a2e3..82e562a 100644 --- a/.github/workflows/reset_test_repo.yml +++ b/.github/workflows/reset_test_repo.yml @@ -201,7 +201,7 @@ jobs: -f ref="refs/heads/${{ env.MAIN_BRANCH }}" \ -f sha="${{ steps.latest-sha.outputs.sha }}" - - name: Apply branch protection rules for '${{ env.MAIN_BRANCH }}' + - name: Apply ruleset for '${{ env.MAIN_BRANCH }}' run: | gh api \ --method POST \ @@ -222,41 +222,41 @@ jobs: -f "bypass_actors[][bypass_mode]=always" # TODO fix and re-enable - # - name: Apply branch protection rules for 'develop' - # run: | - # gh api \ - # --method POST \ - # -H "Accept: application/vnd.github+json" \ - # -H "X-GitHub-Api-Version: 2022-11-28" \ - # /repos/ynput/ayon-addon-action-testing/rulesets \ - # -f "name=Protect develop" \ - # -f "target=branch" \ - # -f "enforcement=active" \ - # -f "conditions[ref_name][include][]=refs/heads/develop" \ - # -f "conditions[ref_name][exclude][]" \ - # -f "rules[][type]=deletion" \ - # -f "rules[][type]=non_fast_forward" \ - # -f "rules[][type]=required_status_checks" \ - # -f "rules[][parameters][strict_required_status_checks_policy]=true" \ - # -f "rules[][parameters][do_not_enforce_on_create]=false" \ - # -f "rules[][parameters][required_status_checks][]" \ - # -f "rules[][parameters][required_status_checks][0][context]=linting" \ - # -f "rules[][parameters][required_status_checks][0][integration_id]=15368" \ - # -f "rules[][type]=pull_request" \ - # -f "rules[][parameters][required_approving_review_count]=1" \ - # -f "rules[][parameters][dismiss_stale_reviews_on_push]=false" \ - # -f "rules[][parameters][require_code_owner_review]=true" \ - # -f "rules[][parameters][require_last_push_approval]=false" \ - # -f "rules[][parameters][required_review_thread_resolution]=false" \ - # -F "bypass_actors[][actor_id]=5" \ - # -f "bypass_actors[][actor_type]=RepositoryRole" \ - # -f "bypass_actors[][bypass_mode]=always" \ - # -F "bypass_actors[][actor_id]=10997209" \ - # -f "bypass_actors[][actor_type]=Team" \ - # -f "bypass_actors[][bypass_mode]=always" \ - # -F "bypass_actors[][actor_id]=1" \ - # -f "bypass_actors[][actor_type]=OrganizationAdmin" \ - # -f "bypass_actors[][bypass_mode]=always" + - name: Apply ruleset for 'develop' + run: | + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/ynput/ayon-addon-action-testing/rulesets \ + -f "name=Protect develop" \ + -f "target=branch" \ + -f "enforcement=active" \ + -f "conditions[ref_name][include][]=refs/heads/develop" \ + -f "conditions[ref_name][exclude][]" \ + -f "rules[][type]=deletion" \ + -f "rules[][type]=non_fast_forward" \ + -f "rules[][type]=required_status_checks" \ + -f "rules[][parameters][strict_required_status_checks_policy]=true" \ + -f "rules[][parameters][do_not_enforce_on_create]=false" \ + -f "rules[][parameters][required_status_checks][]" \ + -f "rules[][parameters][required_status_checks][0][context]=linting" \ + -f "rules[][parameters][required_status_checks][0][integration_id]=15368" \ + -f "rules[][type]=pull_request" \ + -f "rules[][parameters][required_approving_review_count]=1" \ + -f "rules[][parameters][dismiss_stale_reviews_on_push]=false" \ + -f "rules[][parameters][require_code_owner_review]=true" \ + -f "rules[][parameters][require_last_push_approval]=false" \ + -f "rules[][parameters][required_review_thread_resolution]=false" \ + -F "bypass_actors[][actor_id]=5" \ + -f "bypass_actors[][actor_type]=RepositoryRole" \ + -f "bypass_actors[][bypass_mode]=always" \ + -F "bypass_actors[][actor_id]=10997209" \ + -f "bypass_actors[][actor_type]=Team" \ + -f "bypass_actors[][bypass_mode]=always" \ + -F "bypass_actors[][actor_id]=1" \ + -f "bypass_actors[][actor_type]=OrganizationAdmin" \ + -f "bypass_actors[][bypass_mode]=always" prepare-release: