semantic-release / semantic-release/git
branch variable does not match documentation
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 339
- Forks
- 75
- Avg merge
- 5h 15m
- Merged PRs (30d)
- 6
Description
So I recently came across an issue where my commit message couldn't actually include "branch.name".
Upon further investigation, I found this section of the prepare code: https://github.com/semantic-release/git/blob/09200b1612cf4588ce7836b87a3fa31317c38783/lib/prepare.js#L65
await commit(
message
? template(message)({branch: branch.name, lastRelease, nextRelease})
: `chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}`,
{env, cwd}
);
It looks like we've historically been adding branch as just the branch name. Before I submit a PR, it seems there are two ways that this can go:
- change the README to say that only "branch" is available for the message as the branch name
- make branch the object intended with some sort of backwards compatibility for any semantic-release versions (or just make it a major version bump)
I wanted to report this as an issue before trying to submit a PR that makes the opinion.
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 lib/prepare.js at the linked line and compare the message variables described in the README. Decide whether the documented branch value or the implementation should be authoritative, then verify that the chosen behavior or documentation handles compatibility and makes the available message variable unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript
- Domain
- release, tooling
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100