Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If all changesets are empty, the action still creates a PR #205

Closed
glasser opened this issue Aug 16, 2022 · 3 comments · Fixed by #206
Closed

If all changesets are empty, the action still creates a PR #205

glasser opened this issue Aug 16, 2022 · 3 comments · Fixed by #206

Comments

@glasser
Copy link
Contributor

glasser commented Aug 16, 2022

If the only changesets on the branch are "empty" changesets (like those created with changeset --empty, perhaps to make a changeset status CI check pass), the action will still create a PR with no releases. That seems unnecessary? I think it's reasonable that changeset version won't be a no-op in this case (deleting the changeset files or adding them to the list in pre.json) but creating a PR seems overkill?

@Andarist
Copy link
Member

Yeah, this makes sense - we should skip creating the PR in such a case. I would happily accept a PR fixing this.

glasser added a commit to glasser/action that referenced this issue Aug 18, 2022
Fixes changesets#205.

Note that this maintains the previous behavior that if there are any
changesets (even empty ones), the action does not publish packages.
Andarist added a commit that referenced this issue Aug 18, 2022
* Don't create a PR if all changesets are empty

Fixes #205.

Note that this maintains the previous behavior that if there are any
changesets (even empty ones), the action does not publish packages.

* Create three-needles-protect.md

* Update .changeset/three-needles-protect.md

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@kachkaev
Copy link

kachkaev commented Nov 3, 2022

What about cases when changests are empty but dependencies got an update? I’d expect the PR to be up in this scenario.

@glasser
Copy link
Contributor Author

glasser commented Nov 3, 2022

@kachkaev I'm not sure exactly what you mean here (wouldn't there need to be some changeset somewhere in order for there to be a release in the PR?) but I definitely could have missed something as a non-expert.

cometkim pushed a commit to cometkim/yarn-changeset-action that referenced this issue Apr 11, 2023
…#206)

* Don't create a PR if all changesets are empty

Fixes changesets#205.

Note that this maintains the previous behavior that if there are any
changesets (even empty ones), the action does not publish packages.

* Create three-needles-protect.md

* Update .changeset/three-needles-protect.md

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants