Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Sep 5, 2024
1 parent d320478 commit 410997d
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/verifyAudit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
exit 1
fi
echo -e "\033[32mContract $FILENAME was audited in audit $AUDIT_ID.\033[0m"
echo "File $FILE was audited in $AUDIT_ID"
# Extract log entry values into variables
AUDIT_COMPLETED_ON=$(echo "$AUDIT_ENTRY" | jq -r '.auditCompletedOn')
Expand All @@ -242,7 +242,7 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit log contains a date for $AUDIT_ID.\033[0m"
echo "The audit log contains a date for $AUDIT_ID: $AUDIT_COMPLETED_ON"
fi
# make sure that audit log entry contains auditor's (company) name
Expand All @@ -253,7 +253,7 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit log contains the auditor's name for $AUDIT_ID: $AUDITED_BY.\033[0m"
echo "The audit log contains the auditor's name for $AUDIT_ID: $AUDITED_BY"
fi
# make sure that audit log entry contains auditor's git handle
Expand All @@ -264,19 +264,7 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit log contains the auditor's github handle for $AUDIT_ID: $AUDITOR_GIT_HANDLE.\033[0m"
fi
# make sure that audit log entry contains audit report path
if [ -z "$AUDIT_REPORT_PATH" ]; then
echo -e "\033[31mThe audit log entry for file $FILE contains invalid or no 'auditReportPath' information.\033[0m"
echo -e "\033[31mThis github action cannot complete before the audit log is complete.\033[0m"
echo -e "\033[31mAborting now.\033[0m"
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit log contains the path to the audit report for $AUDIT_ID: $AUDIT_REPORT_PATH.\033[0m"
echo "The audit log contains the auditor's github handle for $AUDIT_ID: $AUDITOR_GIT_HANDLE"
fi
# make sure that a file exists at the audit report path
Expand All @@ -287,7 +275,7 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit report for $AUDIT_ID was found in path $AUDIT_REPORT_PATH.\033[0m"
echo "The audit report for $AUDIT_ID was found in path $AUDIT_REPORT_PATH"
fi
# make sure that audit log entry contains audit commit hash
Expand All @@ -298,7 +286,7 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
else
echo -e "\033[32mThe audit log contains the commit hash that was audited in $AUDIT_ID: $AUDIT_COMMIT_HASH.\033[0m"
echo "The audit log contains the commit hash that was audited in $AUDIT_ID: $AUDIT_COMMIT_HASH"
fi
echo -e "\033[32mThe audit log contains all required information for contract $FILE.\033[0m"
Expand All @@ -308,9 +296,10 @@ jobs:
# Check if the target commit is in the list
if echo "$COMMIT_LIST" | grep -q "$TARGET_COMMIT"; then
echo -e "\033[32mCommit $TARGET_COMMIT is associated with PR #$PR_NUMBER.\033[0m"
echo -e "\033[32mCommit $AUDIT_COMMIT_HASH is associated with PR #$PR_NUMBER.\033[0m"
else
echo -e "\033[31mCommit $TARGET_COMMIT is NOT associated with PR #$PR_NUMBER.\033[0m"
echo -e "\033[31mCommit $AUDIT_COMMIT_HASH is NOT associated with PR #$PR_NUMBER.\033[0m"
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
fi
Expand Down

0 comments on commit 410997d

Please sign in to comment.