Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboarding commit message ignores lowercase char #22346

Open
rarkins opened this issue May 22, 2023 Discussed in #22342 · 7 comments
Open

Onboarding commit message ignores lowercase char #22346

rarkins opened this issue May 22, 2023 Discussed in #22342 · 7 comments
Labels
core:onboarding Related to the onboarding process priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented May 22, 2023

Discussed in #22342

Originally posted by simone-dandreta May 22, 2023

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

37.0.0

If you're self-hosting Renovate, select which platform you are using.

github.com

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Was this something which used to work for you, and then stopped?

I never saw this working

Wanted end result.

My default.json file is:
{ "extends": ["config:base", ":dependencyDashboard"], "enabledManagers": ["dockerfile"], "commitMessageAction": "bump", "onboardingCommitMessage": "trivial: Configure Renovate" }

but when I look at the onboarding commit message I see:
Trivial: Configure Renovate with capital 'T'

and this breaks our CI checks on semantic commit messages.
Am I missing something?

What you tried so far.

You can look at the default.json file posted above.

Relevant debug logs

Logs
Copy/paste the relevant log(s) here, between the starting and ending backticks
@rarkins rarkins added type:bug Bug fix of existing functionality status:ready priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others labels May 22, 2023
@simone-dandreta
Copy link

I guess the problem might be here?

@simone-dandreta
Copy link

@rarkins is there any update about this? Thank you.

@rarkins
Copy link
Collaborator Author

rarkins commented Jun 2, 2023

No. PRs welcome

@simone-dandreta
Copy link

@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

will always uppercase the first letter.
Can I just change the logic so it will always be lowercase?

@simone-dandreta
Copy link

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
Copy link
Collaborator

zharinov commented Nov 9, 2023

@zharinov zharinov removed their assignment Nov 10, 2023
@gjrtimmer
Copy link

gjrtimmer commented Nov 29, 2023

@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"
}

@rarkins rarkins added the core:onboarding Related to the onboarding process label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:onboarding Related to the onboarding process priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants