Skip to content

Commit

Permalink
chore: require changeset or label (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatomyr authored Feb 13, 2024
1 parent 1f1ec5c commit 356821b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/require-changeset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Require Either a Changeset or a Label 'No Changeset Needed'
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
require-changeset-or-label:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Changeset Needed') }}
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v3
with:
# check out full history
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: Check for changeset
run: npx changeset status --since origin/main
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Before submitting a pull request, please make sure the following is done:
1. If you’ve fixed a bug or added code that should be tested, don't forget to add [tests](#tests)!
1. Ensure the test suite passes (see the [Tests section](#tests) for more details).
1. Format your code with prettier (`npm run prettier`).
1. Each feat/fix PR should also contain a changeset (to create one, run `npx changeset`; if your changes are scoped to `packages/core` but also affect Redocly CLI behavior, please include the `@redocly/cli` package as well). Please describe what you've done in this PR using sentence case (you can refer to our [changelog](https://redocly.com/docs/cli/changelog/)). This produces a file in `.changeset` folder. Please commit this file along with your changes.
1. Each feat/fix PR should also contain a changeset (to create one, run `npx changeset`; if your changes are scoped to `packages/core` but also affect Redocly CLI behavior, please include the `@redocly/cli` package as well). Please describe what you've done in this PR using sentence case (you can refer to our [changelog](https://redocly.com/docs/cli/changelog/)). This produces a file in `.changeset` folder. Please commit this file along with your changes. If the PR doesn't need a changeset (for example, it is a small change, or updates only documentation), add the 'No Changeset Needed' label to the PR.

## Development setup

Expand Down

1 comment on commit 356821b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.19% 4326/5678
🟡 Branches 65.97% 2258/3423
🟡 Functions 68.93% 699/1014
🟡 Lines 76.39% 4067/5324

Test suite run success

710 tests passing in 101 suites.

Report generated by 🧪jest coverage report action from 356821b

Please sign in to comment.