Skip to content

Test linting

Test linting #8

Workflow file for this run

name: Lint prose with Vale
on:
issue_comment:
types: [created]
jobs:
vale:
if: ${{ github.event.issue.pull_request && github.event.issue.state == 'open' && contains(github.event.comment.body, '/vale') }}
runs-on: ubuntu-latest
container:
image: grafana/vale:latest
steps:
- uses: actions/github-script@v7
with:
# Not a separate file because then it doesn't have to wait for a checkout to be run.
script: |
await github.request('POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'eyes',
});
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
- uses: actions/github-script@v7
id: from-comment
with:
script: |
const script = require('./.github/workflows/from-comment.js');
await script({ core, context, github });
- name: Run linter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TO_LINT: ${{ steps.from-comment.outputs.to-lint }}
run: echo "${TO_LINT}"