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 2df9c33 commit aebeaeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/verifyAudit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ jobs:
else
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"
echo -e "\033[32mThe audit log contains all required information for contract $FILE\033[0m"
echo "now checking if audit commit hash ($AUDIT_COMMIT_HASH) is associated with this PR ($PR_NUMBER)"
# Fetch the list of commits associated with the PR
Expand All @@ -302,13 +302,11 @@ jobs:
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
fi
#### ------------------------------------------------------
# Fetch PR reviews using the GitHub API via gh cli
echo "now checking if auditor ($AUDITOR_GIT_HANDLE) approved this PR ($PR_NUMBER)"
echo "now checking if the auditor ($AUDITOR_GIT_HANDLE) approved this PR ($PR_NUMBER)"
REVIEWS=$(gh api repos/lifinance/contracts/pulls/$PR_NUMBER/reviews --jq '.[] | select(.state == "APPROVED") | @json')
echo "REVIEWS: $REVIEWS"
# Check if the output is empty or not valid JSON
if [[ -z "$REVIEWS" ]]; then
echo "ERROR: No reviews found or failed to fetch reviews for PR #$PR_NUMBER"
Expand Down Expand Up @@ -339,7 +337,7 @@ jobs:
echo -e "\033[32mCheck passed\033[0m"
exit 0
else
echo -e "\033[31mERROR: No review found by $AUDITOR_GIT_HANDLE\033[0m"
echo -e "\033[31mERROR: No review found by git user '$AUDITOR_GIT_HANDLE' (= the auditor)\033[0m"
echo -e "\033[31mCheck failed\033[0m"
echo "CONTINUE=false" >> $GITHUB_ENV
exit 1
Expand Down
2 changes: 1 addition & 1 deletion audit/auditLog.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"audit20240818": {
"auditCompletedOn": "18.08.21",
"auditedBy": "Someone else",
"auditedBy": "SomeName",
"auditorGitHandle": "someone",
"auditReportPath": "./audit/reports/2024.08.14_StargateFacetV2_ReAudit.pdf",
"auditCommitHash": "d622002440317580b5d0fb90ef22b839d84957e2"
Expand Down
File renamed without changes.

0 comments on commit aebeaeb

Please sign in to comment.