From e99881ad6549353f26b775387b9fcbd92cf0586d Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 4 Jul 2026 18:21:50 -0500 Subject: [PATCH] chore(branch-protection): allow actions + moko-deploy bots on protected branches Adds the automation identities to the branch-protection rule definitions so release automation can operate on protected branches: - all rules: push_whitelist_actions_user=true + moko-deploy in push whitelist - dev, rc: enable force-push for the bots so dev can be reset to main via a single `git push --force origin main:dev` (delete+recreate cannot work on a protected branch) - main keeps force-push disabled moko-deploy needs org-team write access to take effect (mcp-mokogitea-api#30). Unblocks the dev-sync + version-persist fixes (Template-Generic#53). Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i --- .mokogitea/branch-protection.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.mokogitea/branch-protection.yml b/.mokogitea/branch-protection.yml index 82f5650..25ab04d 100644 --- a/.mokogitea/branch-protection.yml +++ b/.mokogitea/branch-protection.yml @@ -124,7 +124,8 @@ jobs: "rule_name": "main", "enable_push": true, "enable_push_whitelist": true, - "push_whitelist_usernames": ["jmiller"], + "push_whitelist_usernames": ["jmiller", "moko-deploy"], + "push_whitelist_actions_user": true, "enable_force_push": false, "enable_force_push_allowlist": false, "force_push_allowlist_usernames": [], @@ -140,10 +141,12 @@ jobs: "rule_name": "dev", "enable_push": true, "enable_push_whitelist": true, - "push_whitelist_usernames": ["jmiller"], - "enable_force_push": false, - "enable_force_push_allowlist": false, - "force_push_allowlist_usernames": [], + "push_whitelist_usernames": ["jmiller", "moko-deploy"], + "push_whitelist_actions_user": true, + "enable_force_push": true, + "enable_force_push_allowlist": true, + "force_push_allowlist_usernames": ["jmiller", "moko-deploy"], + "force_push_allowlist_actions_user": true, "enable_merge_whitelist": false, "required_approvals": 0, "block_on_rejected_reviews": false, @@ -154,10 +157,12 @@ jobs: "rule_name": "rc", "enable_push": true, "enable_push_whitelist": true, - "push_whitelist_usernames": ["jmiller"], - "enable_force_push": false, - "enable_force_push_allowlist": false, - "force_push_allowlist_usernames": [], + "push_whitelist_usernames": ["jmiller", "moko-deploy"], + "push_whitelist_actions_user": true, + "enable_force_push": true, + "enable_force_push_allowlist": true, + "force_push_allowlist_usernames": ["jmiller", "moko-deploy"], + "force_push_allowlist_actions_user": true, "enable_merge_whitelist": false, "required_approvals": 0, "block_on_rejected_reviews": false, @@ -168,7 +173,8 @@ jobs: "rule_name": "beta", "enable_push": true, "enable_push_whitelist": true, - "push_whitelist_usernames": ["jmiller"], + "push_whitelist_usernames": ["jmiller", "moko-deploy"], + "push_whitelist_actions_user": true, "enable_force_push": false, "enable_force_push_allowlist": false, "force_push_allowlist_usernames": [], @@ -182,7 +188,8 @@ jobs: "rule_name": "alpha", "enable_push": true, "enable_push_whitelist": true, - "push_whitelist_usernames": ["jmiller"], + "push_whitelist_usernames": ["jmiller", "moko-deploy"], + "push_whitelist_actions_user": true, "enable_force_push": false, "enable_force_push_allowlist": false, "force_push_allowlist_usernames": [],