git
git copied to clipboard
branch variable does not match documentation
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.