From 003fb98efc41fd8abeb72c3e9b48452ddf252aa3 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Tue, 7 Apr 2026 02:43:37 -0400 Subject: [PATCH] feat: [QA][POLICY] Branch Protection + Mandatory Review Policy for All Repos (#918) Refs #918 Agent: groq --- gitea-branch-protection.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gitea-branch-protection.sh diff --git a/gitea-branch-protection.sh b/gitea-branch-protection.sh new file mode 100644 index 0000000..930d9e5 --- /dev/null +++ b/gitea-branch-protection.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Apply branch protections to all repositories +# Requires GITEA_TOKEN env var + +REPOS=("hermes-agent" "the-nexus" "timmy-home" "timmy-config") + +for repo in "${REPOS[@]}" +do + curl -X POST "https://forge.alexanderwhitestone.com/api/v1/repos/Timmy_Foundation/$repo/branches/main/protection" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "required_reviews": 1, + "dismiss_stale_reviews": true, + "block_force_push": true, + "block_deletions": true + }' +done -- 2.43.0