From af726dd1e51bb87e667031814095c8aa6a16ceb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronica=20B=2E=20Frydkj=C3=A6r?= <99909104+Rhod1um@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:05:18 +0200 Subject: [PATCH 1/2] Add bypass actors and remove former wrong bypass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added bypass actors for integration with pull requests and removed bypass allowances for GitHub Actions. Signed-off-by: Veronica B. Frydkjær <99909104+Rhod1um@users.noreply.github.com> --- repository.tf | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/repository.tf b/repository.tf index e1857c4..042761c 100644 --- a/repository.tf +++ b/repository.tf @@ -45,6 +45,12 @@ resource "github_repository_ruleset" "default" { } } + bypass_actors { + actor_id = 15368 + actor_type = "Integration" + bypass_mode = "pull_request" + } + rules { creation = true # restrict creation of default branch update = false # allows PR merges on default branch @@ -57,9 +63,6 @@ resource "github_repository_ruleset" "default" { dismiss_stale_reviews_on_push = true require_last_push_approval = each.value.required_approvals > 0 required_review_thread_resolution = true - bypass_pull_request_allowances { - users = ["github-actions[bot]"] - } } } } @@ -79,15 +82,18 @@ resource "github_repository_ruleset" "all" { } } + bypass_actors { + actor_id = 15368 + actor_type = "Integration" + bypass_mode = "pull_request" + } + rules { creation = false # do not restrict creation update = false deletion = false required_signatures = true non_fast_forward = false - bypass_pull_request_allowances { - users = ["github-actions[bot]"] - } } } From 9128573894ca7c694a4f952e8f24868fdd30b483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronica=20B=2E=20Frydkj=C3=A6r?= <99909104+Rhod1um@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:11:15 +0200 Subject: [PATCH 2/2] Clarify actor_id with GitHub Actions bot ID comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added comment to clarify the actor_id for GitHub Actions bot. Signed-off-by: Veronica B. Frydkjær <99909104+Rhod1um@users.noreply.github.com> --- repository.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository.tf b/repository.tf index 042761c..74db823 100644 --- a/repository.tf +++ b/repository.tf @@ -46,7 +46,7 @@ resource "github_repository_ruleset" "default" { } bypass_actors { - actor_id = 15368 + actor_id = 15368 # Github Actions bot app ID was found here: https://api.github.com/apps/github-actions actor_type = "Integration" bypass_mode = "pull_request" } @@ -83,7 +83,7 @@ resource "github_repository_ruleset" "all" { } bypass_actors { - actor_id = 15368 + actor_id = 15368 # Github Actions bot app ID was found here: https://api.github.com/apps/github-actions actor_type = "Integration" bypass_mode = "pull_request" }