Skip to content

Commit

Permalink
CI: require changesets before merging into version-4 (#6787)
Browse files Browse the repository at this point in the history
Changes that don't touch packages don't require changesets.

If you made a change to a package that you don't want to show up as a
changeset, just run `changeset --empty` like the error says.

(This does assume that your remote is named `origin`. We pass
`origin/version-4` instead of `version-4` because that way CI doesn't
have to actually create a local `version-4` branch. We don't set
`baseBranch` to `origin/version-4` in config.json because enforcing the
remote name even on `changeset add` users seems bad.)
  • Loading branch information
glasser authored Aug 9, 2022
1 parent 9214d26 commit 0c14fef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ jobs:
- setup-node
- run: npm run lint

Changesets:
docker:
- image: cimg/base:stable
steps:
- setup-node
- run: npm run changeset-check

Spell check:
docker:
- image: cimg/base:stable
Expand Down Expand Up @@ -106,3 +113,4 @@ workflows:
- ESLint
- Spell check
- Smoke test built package
- Changesets
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"prettier-check": "prettier --check .",
"prettier-fix": "prettier --write .",
"spell-check": "cspell lint '**' --no-progress || (echo 'Add any real words to cspell-dict.txt.'; exit 1)",
"changeset-publish": "changeset publish"
"changeset-publish": "changeset publish",
"changeset-check": "changeset status --verbose --since=origin/version-4"
},
"workspaces": [
"packages/*"
Expand Down

0 comments on commit 0c14fef

Please sign in to comment.