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

add #16

Merged
merged 4 commits into from
Feb 19, 2025
Merged

add #16

Show file tree
Hide file tree
Changes from all 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
33 changes: 32 additions & 1 deletion .github/workflows/securityAlertsReview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,45 @@ on:
pull_request:
types:
- ready_for_review
paths:
- 'src/**/*.sol'
workflow_dispatch:

jobs:
check-security-alerts:
needs: olympix-static-analysis
runs-on: ubuntu-latest

steps:
# Ensure that the Olympix Static Analysis workflow has run successfully at least once before proceeding.
# This check is necessary because the Security Alerts Review workflow should not proceed unless
# a valid Olympix Static Analysis report is available for the current branch.
- name: Check if Olympix Static Analysis has run at least once and was successful
id: check-analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.head_ref }}
run: |
# Fallback in case BRANCH_NAME is empty.
if [ -z "$BRANCH_NAME" ]; then
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}"
echo "BRANCH_NAME was empty, falling back to: $BRANCH_NAME"
fi

echo "Checking latest Olympix Static Analysis run for branch: $BRANCH_NAME"

# Fetch the latest completed runs of the Olympix Static Analysis workflow
LATEST_RUN=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/olympixStaticAnalysis.yml/runs?status=completed&per_page=10")

# Filter to find the first run with head_branch matching our branch name
WORKFLOW_STATUS=$(echo "$LATEST_RUN" | jq -r --arg branch "$BRANCH_NAME" '.workflow_runs[] | select(.head_branch == $branch) | .conclusion' | head -n1)

if [[ "$WORKFLOW_STATUS" != "success" ]]; then
echo "The Olympix Static Analysis workflow has not been successfully completed for branch: $BRANCH_NAME."
echo "The Security Alerts Review workflow cannot continue because a valid Olympix Static Analysis report is required."
exit 1
fi

- uses: actions/checkout@v4

- uses: jwalton/gh-find-current-pr@master
Expand Down
104 changes: 0 additions & 104 deletions src/Facets/OmniBridgeFacet5.sol

This file was deleted.

104 changes: 0 additions & 104 deletions src/Facets/OmniBridgeFacet6.sol

This file was deleted.

104 changes: 0 additions & 104 deletions src/Facets/OmniBridgeFacet7.sol

This file was deleted.

Loading