From c69fea4ab0b4fd9a3bfa94ee861efd665966b6e0 Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Wed, 22 May 2024 10:30:11 +0100 Subject: [PATCH 1/4] Add status checks to default rule. --- .github/branch-protection.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/branch-protection.sh b/.github/branch-protection.sh index c359d8c..cf092a1 100755 --- a/.github/branch-protection.sh +++ b/.github/branch-protection.sh @@ -24,9 +24,6 @@ curl --location "https://api.github.com/repos/NHSDigital/$1/rulesets" \ { "type": "non_fast_forward" }, - { - "type": "required_signatures" - }, { "type": "pull_request", "parameters": { @@ -36,6 +33,20 @@ curl --location "https://api.github.com/repos/NHSDigital/$1/rulesets" \ "require_last_push_approval": true, "required_review_thread_resolution": true } + }, + { + "type": "required_signatures" + }, + { + "type": "required_status_checks", + "parameters": { + "strict_required_status_checks_policy": true, + "required_status_checks": [ + { + "context": "*" + } + ] + } } ] }' From b610e7f2581f4a10b8bb14915b3295b03b7beb71 Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Wed, 22 May 2024 10:38:53 +0100 Subject: [PATCH 2/4] Add status checks to default rule remove *. --- .github/branch-protection.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/branch-protection.sh b/.github/branch-protection.sh index cf092a1..f98597a 100755 --- a/.github/branch-protection.sh +++ b/.github/branch-protection.sh @@ -41,11 +41,7 @@ curl --location "https://api.github.com/repos/NHSDigital/$1/rulesets" \ "type": "required_status_checks", "parameters": { "strict_required_status_checks_policy": true, - "required_status_checks": [ - { - "context": "*" - } - ] + "required_status_checks": [] } } ] From 4ce928b88869ecb6009f4efd4546948ca101a939 Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Wed, 22 May 2024 11:02:47 +0100 Subject: [PATCH 3/4] Moved branch rules sh to scripts folder. --- .github/README.md => scripts/reposetup/branch-protection.md | 0 {.github => scripts/reposetup}/branch-protection.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/README.md => scripts/reposetup/branch-protection.md (100%) rename {.github => scripts/reposetup}/branch-protection.sh (100%) diff --git a/.github/README.md b/scripts/reposetup/branch-protection.md similarity index 100% rename from .github/README.md rename to scripts/reposetup/branch-protection.md diff --git a/.github/branch-protection.sh b/scripts/reposetup/branch-protection.sh similarity index 100% rename from .github/branch-protection.sh rename to scripts/reposetup/branch-protection.sh From 79cc37d98d3d6bdb219fa2b9bec7a0bba3a74534 Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Wed, 22 May 2024 11:04:29 +0100 Subject: [PATCH 4/4] named folder. --- scripts/{reposetup => git-repo}/branch-protection.md | 0 scripts/{reposetup => git-repo}/branch-protection.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename scripts/{reposetup => git-repo}/branch-protection.md (100%) rename scripts/{reposetup => git-repo}/branch-protection.sh (100%) diff --git a/scripts/reposetup/branch-protection.md b/scripts/git-repo/branch-protection.md similarity index 100% rename from scripts/reposetup/branch-protection.md rename to scripts/git-repo/branch-protection.md diff --git a/scripts/reposetup/branch-protection.sh b/scripts/git-repo/branch-protection.sh similarity index 100% rename from scripts/reposetup/branch-protection.sh rename to scripts/git-repo/branch-protection.sh