Skip to content

Commit 5e001f7

Browse files
Fix Linter issue
1 parent c32dfe8 commit 5e001f7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/linter.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Lint Code Base
22

33
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
46
pull_request_review:
57
types: [submitted]
68

@@ -9,18 +11,15 @@ permissions:
911

1012
jobs:
1113
lint:
12-
if: github.event.review.state == 'approved'
14+
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
1315
name: Lint Code Base
1416
runs-on: ubuntu-latest
1517
steps:
1618
- name: Checkout Code
1719
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1820
with:
19-
# Check out the PR head through GitHub's pull ref for review events
20-
ref: refs/pull/${{ github.event.pull_request.number }}/head
21-
# Full git history is needed to get a proper list of changed files within `super-linter`
21+
ref: ${{ github.event.pull_request.head.sha }}
2222
fetch-depth: 0
23-
# Disable credential persistence to harden the runner
2423
persist-credentials: false
2524

2625
- name: Set lint SHA from checked-out HEAD

0 commit comments

Comments
 (0)