Skip to content

Commit 559ba37

Browse files
authored
Update action
1 parent fc2195b commit 559ba37

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/vale-linting.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
name: Vale Documentation Linting
22

33
on:
4-
pull_request:
4+
pull_request_target: # ← This is the key change
5+
types: [opened, synchronize, reopened]
56
paths:
67
- '**.md'
78
- '**.adoc'
89

10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
914
jobs:
1015
vale:
1116
runs-on: ubuntu-latest
1217
steps:
13-
- name: Checkout
18+
- name: Checkout PR branch
1419
uses: actions/checkout@v5
1520
with:
21+
ref: ${{ github.event.pull_request.head.sha }} # ← Checkout the PR's code
1622
fetch-depth: 0
1723

1824
- name: Run Elastic Vale Linter
1925
uses: elastic/vale-rules@main
2026
with:
21-
reporter: github-pr-review
27+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)