forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.42 KB
/
pr-changeset-review.yml
File metadata and controls
41 lines (35 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: "pr-changeset-review"
# This workflow runs lint-like checks against changesets in PRs. The linting tool used is called Vale. The worflow will
# add comments for any warnings or errors that Vale finds in the changeset.
# To run vale locally against changesets, you can use `pnpm run check:changesets`.
on:
pull_request:
types:
- opened # PR is created
- synchronize # commits added to PR
- reopened # closed PR re-opened
branches:
- main
paths:
- ".changeset/**" # Trigger only when changes are found under .changeset
permissions:
pull-requests: read
jobs:
vale:
permissions:
pull-requests: write # for errata-ai/vale-action to add comments to PRs
name: vale
runs-on: ubuntu-latest
steps:
# release notes: https://github.com/actions/checkout/releases/tag/v6.0.0
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # ratchet:actions/checkout@v6
with:
persist-credentials: false
# release notes: https://github.com/errata-ai/vale-action/releases/tag/v2.1.1
- uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # ratchet:errata-ai/vale-action@v2
with:
files: .changeset
vale_flags: "--glob=*-*-*.md"
reporter: github-pr-review
# Only run on added/changed files/lines. See https://github.com/reviewdog/reviewdog#filter-mode
filter_mode: added