Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix audit-verifier action ( comma- vs. newline separated formatting of protected contracts) #1009

Merged
merged 5 commits into from
Feb 20, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/versionControlAndAuditCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,27 @@ jobs:
echo "This step will make sure that an audit is logged for each contract modified/added by this PR."
echo "It will also make sure that no information is missing in the audit log and that the information is meaningful."

# load list of protected contracts
PROTECTED_CONTRACTS=$(cat contracts_for_audit.txt)
echo "cat contracts_for_audit.txt:"
echo cat contracts_for_audit.txt
echo ""

# convert from comma-separated to newline-separated
CONTRACTS_FOR_AUDIT_STR=$(tr ',' '\n' < contracts_for_audit.txt)
echo "CONTRACTS_FOR_AUDIT_STR: $CONTRACTS_FOR_AUDIT_STR"
PROTECTED_CONTRACTS="$CONTRACTS_FOR_AUDIT_STR"
echo "PROTECTED_CONTRACTS: $PROTECTED_CONTRACTS"



# CONTRACTS_FOR_AUDIT_STR=$(IFS=$'\n'; $(cat contracts_for_audit.txt))
# echo "CONTRACTS_FOR_AUDIT_STR: $CONTRACTS_FOR_AUDIT_STR"
# echo -e "$CONTRACTS_FOR_AUDIT_STR" > contracts_for_audit.txt
# echo ""

# # load list of protected contracts
# PROTECTED_CONTRACTS=$(cat contracts_for_audit.txt)
# echo "PROTECTED_CONTRACTS: $PROTECTED_CONTRACTS"

##### make sure that there are any protected contracts
if [[ -z $PROTECTED_CONTRACTS ]]; then
echo -e "\033[31mNo protected contracts found. This should not happen (action should stop earlier). Please check the code of the Github action. Aborting now.\033[0m"
Expand Down
Loading