Skip to content

Commit 57c761b

Browse files
Fix linter failure
1 parent 3f1409f commit 57c761b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/linter.yml

Lines changed: 7 additions & 1 deletion
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, ready_for_review]
46
pull_request_review:
57
types: [submitted]
68

@@ -9,7 +11,7 @@ permissions:
911

1012
jobs:
1113
lint:
12-
if: github.event_name == 'pull_request_review' && 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:
@@ -23,9 +25,13 @@ jobs:
2325
# Disable credential persistence to harden the runner
2426
persist-credentials: false
2527

28+
- name: Fetch base branch for diff
29+
run: git fetch --no-tags --prune origin "+refs/heads/${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }}"
30+
2631
- name: Lint Code Base
2732
uses: super-linter/super-linter@12150456a73e248bdc94d0794898f94e23127c88 # v7
2833
env:
2934
VALIDATE_ALL_CODEBASE: false
3035
DEFAULT_BRANCH: ${{ github.event.pull_request.base.ref }}
36+
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
3137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)