Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Sep 3, 2024
1 parent 09eeaf4 commit a113a73
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/protectAuditorsGroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
# Convert string to sorted lines and remove empty lines
echo "$SC_ADMINS_MEMBERS" | tr ' ' '\n' | sort | uniq > sc_admins_sorted.txt
echo "$SC_CORE_MEMBERS" | tr ' ' '\n' | sort | uniq > sc_core_sorted.txt
echo "$AUDITORS_MEMBERS" | tr ' ' '\n' | sort | uniq > auditors_sorted.txt
# Check if both files exist and are not empty
Expand All @@ -60,8 +61,7 @@ jobs:
exit 1
fi
echo "Checking overlap between SC_ADMINS and AUDITORS..."
# OVERLAP=$(echo "$SC_ADMINS_MEMBERS" | grep -Fxf - <(echo "$AUDITORS_MEMBERS")) || { echo "Overlap check failed"; exit 1; }
echo "Checking for git users that are members of both $SC_ADMINS and $AUDITORS team..."
OVERLAP=$(comm -12 sc_admins_sorted.txt auditors_sorted.txt)
if [ -n "$OVERLAP" ]; then
Expand All @@ -72,6 +72,17 @@ jobs:
echo -e "\033[32mNo overlap found between $SC_ADMINS and $AUDITORS.\033[0m"
fi
echo "Checking for git users that are members of both $SC_CORE and $AUDITORS team..."
OVERLAP=$(comm -12 sc_admins_sorted.txt auditors_sorted.txt)
if [ -n "$OVERLAP" ]; then
echo -e "\033[31mERROR: The following git users are members of both $SC_CORE and $AUDITORS groups: $overlap\033[0m"
echo -e "\033[31mAuditors must be external personnel and cannot be team members or admins\033[0m"
exit 1
else
echo -e "\033[32mNo overlap found between $SC_CORE and $AUDITORS.\033[0m"
fi
# ##### Check overlap between smart-contract-core and auditors
# overlap=$(echo "$SC_ADMINS_MEMBERS" | grep -Fxf - <(echo "$AUDITORS_MEMBERS"))
Expand Down

0 comments on commit a113a73

Please sign in to comment.