Skip to content

thomasgauvin: content nits #8105

thomasgauvin: content nits

thomasgauvin: content nits #8105

Workflow file for this run

name: Style guide
on:
pull_request:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get Changed Files from Pull Request
if: ${{ !cancelled() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# get file names and structure as JSON
files=$(gh api /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files -q '.[] | select(.status != "removed") | .filename | select(test("(.yaml|yml|md)$"))')
filesArray="[$(echo "$files" | sed -e 's/^/"/' -e 's/$/"/' -e 's/ /", "/g' | tr '\n' , | sed 's/,$//')]"
echo "CHANGED_FILES=$filesArray" >> "$GITHUB_ENV"
- name: Output Changed Files
run: echo ${{ env.CHANGED_FILES }}
- name: Vale
uses: errata-ai/vale-action@reviewdog
if: ${{ !cancelled() }}
with:
files: ${{ env.CHANGED_FILES }}
reporter: github-pr-review
filter_mode: diff_context