From 4d947be33c82fd9c41c5ba219f6163cbd6f9fe8f Mon Sep 17 00:00:00 2001 From: Simon Thulbourn Date: Tue, 24 Jun 2025 08:25:38 +0000 Subject: [PATCH] chore(ci): Update branch protection rules --- .github/branch_protection_settings/1.x.x.json | 53 +++++++++++++++++++ .github/branch_protection_settings/main.json | 42 +++++++++------ 2 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 .github/branch_protection_settings/1.x.x.json diff --git a/.github/branch_protection_settings/1.x.x.json b/.github/branch_protection_settings/1.x.x.json new file mode 100644 index 000000000..e52aba745 --- /dev/null +++ b/.github/branch_protection_settings/1.x.x.json @@ -0,0 +1,53 @@ +{ + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection/required_status_checks", + "strict": true, + "contexts": [ + "SonarCloud" + ], + "contexts_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection/required_status_checks/contexts", + "checks": [ + { + "context": "SonarCloud", + "app_id": null + } + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection/required_pull_request_reviews", + "dismiss_stale_reviews": false, + "require_code_owner_reviews": false, + "require_last_push_approval": false, + "required_approving_review_count": 0 + }, + "required_signatures": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/1.x.x/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": false + }, + "allow_force_pushes": { + "enabled": false + }, + "allow_deletions": { + "enabled": false + }, + "block_creations": { + "enabled": false + }, + "required_conversation_resolution": { + "enabled": false + }, + "lock_branch": { + "enabled": false + }, + "allow_fork_syncing": { + "enabled": false + } +} diff --git a/.github/branch_protection_settings/main.json b/.github/branch_protection_settings/main.json index d283b3d5f..9fc6cc07d 100644 --- a/.github/branch_protection_settings/main.json +++ b/.github/branch_protection_settings/main.json @@ -3,23 +3,33 @@ "required_status_checks": { "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/required_status_checks", "strict": true, - "contexts": [ - "SonarCloud" - ], + "contexts": [], "contexts_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/required_status_checks/contexts", - "checks": [ - { - "context": "SonarCloud", - "app_id": 57789 - } - ] + "checks": [] + }, + "restrictions": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/restrictions/apps", + "users": [], + "teams": [], + "apps": [] }, "required_pull_request_reviews": { "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/required_pull_request_reviews", - "dismiss_stale_reviews": false, + "dismiss_stale_reviews": true, "require_code_owner_reviews": false, - "require_last_push_approval": false, - "required_approving_review_count": 0 + "require_last_push_approval": true, + "required_approving_review_count": 1, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/dismissal_restrictions/teams", + "users": [], + "teams": [], + "apps": [] + } }, "required_signatures": { "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/required_signatures", @@ -27,10 +37,10 @@ }, "enforce_admins": { "url": "https://api.github.com/repos/aws-powertools/powertools-lambda-java/branches/main/protection/enforce_admins", - "enabled": true + "enabled": false }, "required_linear_history": { - "enabled": false + "enabled": true }, "allow_force_pushes": { "enabled": false @@ -39,10 +49,10 @@ "enabled": false }, "block_creations": { - "enabled": false + "enabled": true }, "required_conversation_resolution": { - "enabled": false + "enabled": true }, "lock_branch": { "enabled": false