Skip to content

Commit

Permalink
Update bypass-review.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-sorrentino committed Sep 3, 2024
1 parent 8984794 commit 9ffca13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/bypass-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
- name: Fetch main branch
run: git fetch origin main:main

- name: Fetch PR branch
run: |
git fetch origin $GITHUB_HEAD_REF:$GITHUB_HEAD_REF
git checkout $GITHUB_HEAD_REF
- name: Set up GitHub CLI Authentication
env:
GH_TOKEN: ${{ secrets.ADMIN_PAT }}
Expand All @@ -29,7 +34,7 @@ jobs:
- name: Check for specific files and approve if conditions are met
run: |
FILES=$(git diff --name-only main ${{ github.head_ref }} || git diff --name-only main $GITHUB_REF_NAME)
FILES=$(git diff --name-only main $GITHUB_HEAD_REF)
if echo "$FILES" | grep -qvE '(\.css$|^hushline/version.py$)'; then
echo "PR contains files other than .css or hushline/version.py. Exiting without approval."
exit 0
Expand Down

0 comments on commit 9ffca13

Please sign in to comment.