dependabot / dependabot/dependabot-core

Emoji prefixes are always converted to shortcode

Open
#4,565 8 comments 6 reactions 0 assignees View on GitHub
F: pull-requests
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
155

Description

I primarily view git logs in my terminal, and seeing dependabot's shortlog expansions mixed in with my other emoji-prefixed commits is very annoying! I've tried to configure the `dependabot.yml` commit messages to use emoji, but they just get converted back to shortcode!

I couldn't find where that conversion is happening in this repository. Perhaps it's an artifact of octokit or the github API? When I look at the specs for `Dependabot::PullRequestCreator::PrNamePrefixer`, it _looks_ like it should be using a simple unicode emoji... that's what happens in the spec. But that's not the behavior I'm experiencing.

In addition to my simple config setting not being honored, I also think the following code snippet is buggy:

https://github.com/dependabot/dependabot-core/blob/7444344c03b86112b4801eec92b0909e05dbfe33/common/lib/dependabot/pull_request_creator/pr_name_prefixer.rb#L253-L261

That's the only logic I could find for automatically determining the commit style... and it completely ignores when commits start with actual unicode emoji!

Thanks! 🙂

Contributor guide

Open the contributing guide

Research direction

Start with common/lib/dependabot/pull_request_creator/pr_name_prefixer.rb, especially the linked lines, and its specs for Dependabot::PullRequestCreator::PrNamePrefixer. Trace how configured commit messages and existing commit prefixes are detected, then reproduce the behavior with a Unicode emoji prefix. Done means configured Unicode prefixes remain Unicode and existing emoji-prefixed commits are detected correctly, with specs covering both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.