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

Fails to detect letter case with gitmoji prefixed commit messages #7103

Open
1 task done
ttytm opened this issue Apr 17, 2023 · 2 comments
Open
1 task done

Fails to detect letter case with gitmoji prefixed commit messages #7103

ttytm opened this issue Apr 17, 2023 · 2 comments
Labels
F: pull-requests Issues about Dependabot pull requests good first issue T: bug 🐞 Something isn't working

Comments

@ttytm
Copy link

ttytm commented Apr 17, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

cargo

Package manager version

No response

Language version

No response

Manifest location and content before the Dependabot update

No response

dependabot.yml content

version: 2
updates:
  - package-ecosystem: cargo
    directory: /
    schedule:
      interval: weekly
      time: "04:00"
    assignees:
      - tobealive
    commit-message:
      prefix: "⬆️ "

  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: weekly
      time: "04:00"
    assignees:
      - tobealive
    commit-message:
      prefix: "⬆️ "

Updated dependency

No response

What you expected to see, versus what you actually saw

Dependabot won't detect the letter case after merging previous commits with lowercase.

Commit message submitted by dependabot:

⬆️ Bump h2 from 0.3.16 to 0.3.17

Merged message:

⬆️ bump h2 from 0.3.16 to 0.3.17

Consecutive commits:

⬆️ Bump h2 from 0.3.16 to 0.3.17

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

This project uses the gitmoji code for its commit prefixes where the problem occurs.

https://github.com/tobealive/wthrr-the-weathercrab

Related issues I've searched and read include it's linked relatives:

Smallest manifest that reproduces the issue

No response

@ttytm ttytm added the T: bug 🐞 Something isn't working label Apr 17, 2023
@jeffwidman jeffwidman added L: rust:cargo Rust crates via cargo F: pull-requests Issues about Dependabot pull requests good first issue and removed L: rust:cargo Rust crates via cargo labels Apr 20, 2023
@jeffwidman
Copy link
Member

Thanks, I didn't fully understand what you were asking for until I read:

This is a fairly rare edgecase, so it's tough to justify the core team working on it. Thankfully, this is open source, so if you or anyone else is interested, we'd welcome a PR.

I suspect this one shouldn't be that hard to fix, especially if you use one of our debugging tools to simulate the update job locally: https://github.com/dependabot/dependabot-core#debugging-problems

You can add a few debugger statements to narrow down where it's not picking up the correct casing: https://github.com/dependabot/dependabot-core#adding-debug-breakpoints

@kevinmatthes
Copy link

I had a look at the source code and I think the cause of this problem is https://github.com/dependabot/dependabot-core/blob/main/common/lib/dependabot/pull_request_creator/pr_name_prefixer.rb#L132. The easiest solution should be to just invert the boolean there in case the GitMoji style is used; but this is just an assumption which I never tested.

However, there might be some projects which use GitMoji and require an upper case B for "Bump". Thus, I would like to suggest to add a general configuration option controlling the case of "Bump" such that the behaviour of the case detection could be explicitly controlled regardless of the exact commit message style. I assume such a feature would be useful for a broader audience and would not break anything when setting the current behaviour as default in case nothing is configured. Furthermore, with the case of "Bump" set explicitly, the performance would be enhanced as the case detection could be completed faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: pull-requests Issues about Dependabot pull requests good first issue T: bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants