From 32d5474999d70e1a6d3faea3ce5b170310de38ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Wed, 26 Nov 2025 14:20:45 +0200 Subject: [PATCH] Update github action file --- .github/workflows/block_reserved_branches.yml | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/block_reserved_branches.yml b/.github/workflows/block_reserved_branches.yml index ba3fc471b..4a73aef74 100644 --- a/.github/workflows/block_reserved_branches.yml +++ b/.github/workflows/block_reserved_branches.yml @@ -23,38 +23,38 @@ jobs: ####################################################### # 🟦 1) Allowed Users List ####################################################### - ALLOWED_USERS=( - "expsa" - "moutazmuhammad" - "ronozoro" - "Abubaker-Altaib" - "altexp" - "the5abir" - "ahmadaking" - "kchyounes19" - "abdurrahman-saber" - "maltayyar2" - "esam-sermah" - "mohammed-alkhazrji" - ) + # ALLOWED_USERS=( + # "expsa" + # "moutazmuhammad" + # "ronozoro" + # "Abubaker-Altaib" + # "altexp" + # "the5abir" + # "ahmadaking" + # "kchyounes19" + # "abdurrahman-saber" + # "maltayyar2" + # "esam-sermah" + # "mohammed-alkhazrji" + # ) - IS_ALLOWED="false" - for user in "${ALLOWED_USERS[@]}"; do - if [[ "$CREATOR" == "$user" ]]; then - IS_ALLOWED="true" - break - fi - done + # IS_ALLOWED="false" + # for user in "${ALLOWED_USERS[@]}"; do + # if [[ "$CREATOR" == "$user" ]]; then + # IS_ALLOWED="true" + # break + # fi + # done - if [[ "$IS_ALLOWED" == "false" ]]; then - echo "❌ User '$CREATOR' is NOT allowed to create branches. Deleting..." - curl -s -X DELETE \ - -H "Authorization: token $GH_TOKEN" \ - https://api.github.com/repos/$REPO/git/refs/heads/$BRANCH_NAME - exit 1 - fi + # if [[ "$IS_ALLOWED" == "false" ]]; then + # echo "❌ User '$CREATOR' is NOT allowed to create branches. Deleting..." + # curl -s -X DELETE \ + # -H "Authorization: token $GH_TOKEN" \ + # https://api.github.com/repos/$REPO/git/refs/heads/$BRANCH_NAME + # exit 1 + # fi - echo "✔ User '$CREATOR' is allowed." + # echo "✔ User '$CREATOR' is allowed." ####################################################### # 🟦 2) Reserved Branch Names (Your Existing List)