From 767d0be7222db3effb813b7eb7efa0ccb288b55d Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Fri, 8 Sep 2023 14:04:34 +0200 Subject: [PATCH] Add mandatory check for the changeset (#1000) * Add mandatory check for the changeset * Skip check on label * Fx typo and add synchronize event --- .github/workflows/changeset-checker.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/changeset-checker.yml diff --git a/.github/workflows/changeset-checker.yml b/.github/workflows/changeset-checker.yml new file mode 100644 index 0000000..28cc095 --- /dev/null +++ b/.github/workflows/changeset-checker.yml @@ -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