microsoft / microsoft/beachball

With groupChanges, existing change file for branch should be updated if it exists

Open
#602 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
815
Forks
93
Avg merge
2d 13h
Merged PRs (30d)
12

Description

With the groupChanges option in a monorepo, beachball will currently create a new file each time you run yarn change (with additional changed packages) even if a multi-package change file already existed for that branch.

Repro:

  1. Set groupChanges: true in beachball config
  2. Change some packages and commit
  3. Run beachball to create a change file
  4. Change some more packages and commit
  5. Run beachball again

Actual: a new change file is created

Expected: new changes should be added to the existing change file for that branch

Important edge case: must verify that the existing file is for multiple packages (has changes key) before adding to it. Otherwise fall back to creating a new file. (This is important for repos which recently enabled groupChanges and may still have open PR branches with single-package change files.)

cc @jcreamer898 -- this is more of an enhancement than a bug, but if you have time and don't mind working on it that would be great (not sure if/when I'd get to it)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the groupChanges handling used by yarn change and trace how existing change files are selected. Reproduce the two-run scenario, then verify that an existing file is updated only when it has a changes key; otherwise a new file should be created. Done means both the multi-package and single-package edge cases behave as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
release, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.