Add mandatory check for the changeset (#1000)

* Add mandatory check for the changeset

* Skip check on label

* Fx typo and add synchronize event
This commit is contained in:
Krzysztof Wolski 2023-09-08 14:04:34 +02:00 committed by GitHub
parent 2951fb3ab6
commit 767d0be722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

31
.github/workflows/changeset-checker.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: Changesets
on:
pull_request:
types:
- opened
- labeled
- edited
- synchronize
branches-ignore:
- 'changeset-release/**'
jobs:
changeset_check:
name: Changeset added to the PR
# Adding 'skip changesets' label to the PR will skip this job
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip changeset') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# check out full history
fetch-depth: 0
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Changeset added
run: npx changeset status --since origin/main