build: filter out duplicate cherry-picked commits in changelog by devversion · Pull Request #37956 · angular/angular · GitHub
Skip to content

build: filter out duplicate cherry-picked commits in changelog - #37956

Closed
devversion wants to merge 2 commits into
angular:masterfrom
devversion:build/dedupe-changelog-existing-commits
Closed

devversion wants to merge 2 commits into
angular:masterfrom
devversion:build/dedupe-changelog-existing-commits

Conversation

@devversion

Copy link
Copy Markdown
Member

Often changelogs are generated from the patch branch and then
cherry-picked into the CHANGELOG.md file in master for
better access and readability. This is problematic though as
conventional-changelog (the tool we use for generating the
changelog), will duplicate commits when a future changelog
is generated from master then (i.e. for a new minor release).

This happens because conventional-changelog always generates the
changelog from the latest tag in a given branch to HEAD. The
tag in the patch branch does not correspond to any SHA in master
so the intersection of commits is not automatically omitted.

We work around this naively (until we have a better tool provided
by dev-infra), by deduping commits that are already part of the
changelog. This has proven to work as expected in the components
repo.

@devversion devversion added area: build & ci Related the build and CI infrastructure of the project action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jul 7, 2020
@ngbot ngbot Bot modified the milestone: needsTriage Jul 7, 2020
@devversion
devversion marked this pull request as ready for review July 7, 2020 16:29
@devversion
devversion force-pushed the build/dedupe-changelog-existing-commits branch from dadbad2 to 01fa8ce Compare July 7, 2020 16:29

@josephperrott josephperrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, one nit to take a look at if you want.

Comment thread tools/gulp-tasks/changelog.js Outdated

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 7, 2020
Often changelogs are generated from the patch branch and then
cherry-picked into the `CHANGELOG.md` file in `master` for
better access and readability. This is problematic though as
`conventional-changelog` (the tool we use for generating the
changelog), will duplicate commits when a future changelog
is generated from `master` then (i.e. for a new minor release).

This happens because conventional-changelog always generates the
changelog from the latest tag in a given branch to `HEAD`. The
tag in the patch branch does not correspond to any SHA in `master`
so the intersection of commits is not automatically omitted.

We work around this naively (until we have a better tool provided
by dev-infra), by deduping commits that are already part of the
changelog. This has proven to work as expected in the components
repo.
@devversion
devversion force-pushed the build/dedupe-changelog-existing-commits branch from 01fa8ce to 0606ae1 Compare July 8, 2020 06:09
alxhub pushed a commit that referenced this pull request Jul 8, 2020
Often changelogs are generated from the patch branch and then
cherry-picked into the `CHANGELOG.md` file in `master` for
better access and readability. This is problematic though as
`conventional-changelog` (the tool we use for generating the
changelog), will duplicate commits when a future changelog
is generated from `master` then (i.e. for a new minor release).

This happens because conventional-changelog always generates the
changelog from the latest tag in a given branch to `HEAD`. The
tag in the patch branch does not correspond to any SHA in `master`
so the intersection of commits is not automatically omitted.

We work around this naively (until we have a better tool provided
by dev-infra), by deduping commits that are already part of the
changelog. This has proven to work as expected in the components
repo.

PR Close #37956
@alxhub alxhub closed this in 82a2207 Jul 8, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Aug 8, 2020
profanis pushed a commit to profanis/angular that referenced this pull request Sep 5, 2020
…ar#37956)

Often changelogs are generated from the patch branch and then
cherry-picked into the `CHANGELOG.md` file in `master` for
better access and readability. This is problematic though as
`conventional-changelog` (the tool we use for generating the
changelog), will duplicate commits when a future changelog
is generated from `master` then (i.e. for a new minor release).

This happens because conventional-changelog always generates the
changelog from the latest tag in a given branch to `HEAD`. The
tag in the patch branch does not correspond to any SHA in `master`
so the intersection of commits is not automatically omitted.

We work around this naively (until we have a better tool provided
by dev-infra), by deduping commits that are already part of the
changelog. This has proven to work as expected in the components
repo.

PR Close angular#37956
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants