Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/vale-linting.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
name: Vale Documentation Linting

on:
pull_request_target: # ← This is the key change
types: [opened, synchronize, reopened]
pull_request:
paths:
- '**.md'
- '**.adoc'

permissions:
contents: read
pull-requests: write
pull-requests: write # Required for posting PR comments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only work as long as it's a PR from an upstream, otherwise it will not work for forked PRs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any solution to that?


jobs:
vale:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }} # ← Checkout the PR's code
fetch-depth: 0

- name: Run Elastic Vale Linter
uses: elastic/vale-rules@main
with:
Expand Down