Open rarkins opened 1 year ago
I guess the problem might be here?
@rarkins is there any update about this? Thank you.
No. PRs welcome
@rarkins I ran a test and it looks like the issue is that the logic when the prefix is empty:
Normalized Subject: trivial: Configure Renovate
Prefix:
Title: Trivial: Configure Renovate
so the FormatSubject() func https://github.com/renovatebot/renovate/blob/947babe092ddf8b70357791059296eb876ed4623/lib/workers/repository/model/commit-message.ts#L71
will always uppercase the first letter. Can I just change the logic so it will always be lowercase?
I need to ask a question about the tests. Why we always uppercase the message first char? Examples:
describe('CustomCommitMessage', () => {
it.each`
subject | prefix | result
${'test'} | ${''} | ${'Test'}
${' test '} | ${' '} | ${'Test'}
Also the semantic commit message:
describe('workers/repository/model/semantic-commit-message', () => {
it('should format message without prefix', () => {
const message = new SemanticCommitMessage();
message.subject = 'test';
expect(message.toString()).toBe('Test');
});
why can't we just keep the first letter as it is?
@zharinov Yes, still needed; currently implementing Renovate Bot on GitLab (Private) Renovate:37.74. The first letter of Onboarding PR is still a Capital case which breaks semantic commit messages and also breaks our tooling and scripting which generates CHANGELOG etc.
I finally have been able to fix this with the following config:
{
commitMessageLowerCase: "auto",
commitMessagePrefix: "chore",
semanticCommits: "enabled",
semanticCommitType: "chore",
semanticCommitScope: "deps",
onboarding: true,
onboardingCommitMessage: "add renovate configuration",
onboardingPrTitle: "configure renovate"
}
Discussed in https://github.com/renovatebot/renovate/discussions/22342
Logs
``` Copy/paste the relevant log(s) here, between the starting and ending backticks ```