semantic-release / semantic-release/release-notes-generator
Question: Merging pre-release branches & generated changelog
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 368
- Forks
- 55
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
We're using semantic-release in our projects with many collaborators. When we develop a new feature we're creating a pre-release branch which publishes to a dist-tag named according to this branch name, so other developers can use it.
Let's say we develop feature-foo, we get pre-releases with dist-tag @feature-foo and tags x.y.z-feature-foo.1 and so on (x.y.z is the previous release version on that branch).
Since we have activated semantic-release/changelog in our .releaserc.json (see below), every pre-release will get a changelog entry according to its commit comments and a release header like this:
CHANGELOG.md
### Features
* My commit comment 2 ([d762374](link omitted))
# [x.y.z-feature-foo.2](link omitted) (2024-2-14)
### Features
* My commit comment 1 ([4e6731c](link omitted))
# [x.y.z-feature-foo.1](link omitted) (2024-2-14)
Now when the feature is finished, we merge the feature branch by Gitlab Mmerge request to the main branch. This causes the changelog file and every pre-release entry to be merged into the main branch changelog too, which clutters the changelog and is clearly not desired.
Now the questions:
- How is this intended to be handled?
- Has someone else the same problem?
- Are we doing something strange/wrong?
Kind regards
Frank
.releaserc.json
{
"branches": [
{"name": "feature-([0-9A-Za-z-]+)", "prerelease": true},
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/gitlab",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied .releaserc.json and the generated CHANGELOG.md, then review the release-notes-generator and semantic-release documentation for prerelease branches and changelog commits. Done means reaching and recording a maintainer-approved answer for how merged prerelease changelog entries should be handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- release
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100