Skip to content

Commit 8184c72

Browse files
Fix Linter issue
1 parent 29750dd commit 8184c72

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/linter.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@ permissions:
1111

1212
jobs:
1313
lint:
14-
if: github.event.review.state == 'approved'
14+
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
1515
name: Lint Code Base
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout Code
1919
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2020
with:
21-
# Check out the PR head through GitHub's pull ref for review events
22-
ref: refs/pull/${{ github.event.pull_request.number }}/head
23-
# Full git history is needed to get a proper list of changed files within `super-linter`
21+
ref: ${{ github.head_ref }}
2422
fetch-depth: 0
25-
# Disable credential persistence to harden the runner
2623
persist-credentials: false
2724

2825
- name: Set lint SHA from checked-out HEAD
@@ -37,5 +34,5 @@ jobs:
3734
env:
3835
VALIDATE_ALL_CODEBASE: false
3936
DEFAULT_BRANCH: ${{ github.event.pull_request.base.ref }}
40-
GITHUB_SHA: ${{ steps.set_lint_sha.outputs.sha }}
37+
GITHUB_HEAD_REF: ${{ github.head_ref }}
4138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)