Identify Dependabot commits by author name in PR name prefixer - #15199
Identify Dependabot commits by author name in PR name prefixer#15199somaz94 wants to merge 1 commit into
Conversation
147b94a to
6f45972
Compare
9d7d86c to
6f45972
Compare
|
Marking this ready for review. The substantive change is verified green: the The red ecosystem legs (bazel, bun, composer, hex, gradle, helm, julia, pub, python, terraform, pre-commit) all fail at the shared
|
6f45972 to
3bf6335
Compare
|
Rebased onto latest The two remaining red checks are flaky
Both pass on |
3bf6335 to
5375611
Compare
|
The red checks here are pre-existing CI instability, not from this change.
I rebased onto the latest |
5375611 to
7efdaca
Compare
|
Gentle nudge on this one — it identifies Dependabot commits by author name in the PR name prefixer. The two failing legs look like flaky infra unrelated to the change (the prefixer tests pass); happy to rebase to re-run if useful. Thanks! |
7efdaca to
cfae2a9
Compare
cfae2a9 to
f91c4c9
Compare
5fa28f9 to
593c41d
Compare
|
Could someone re-run the It is the only red check out of 151 (150 passing), and it looks unrelated to this change:
I rebased onto latest |
593c41d to
31e0389
Compare
What are you trying to accomplish?
Fixes #6968.
The PR name prefixer identifies Dependabot's own commits in order to (1) reuse the prefix style of the last Dependabot commit and (2) exclude Dependabot commits when sampling the repository's commit convention. For GitLab, Azure, Bitbucket, and CodeCommit it did this by matching the hardcoded
support@dependabot.comauthor email.As noted in #6968, that address is a pre-acquisition leftover that is no longer used for commits, and on self-hosted setups the author email is operator-configurable — so the email match silently fails. When it does, the prefixer can no longer reuse the last Dependabot commit's style, and Dependabot's own commits leak into the sample used to detect the repository's convention.
This switches those four providers to identify Dependabot commits by the bot author name (
dependabot[bot]), which sidesteps the "which email is correct?" question entirely and is robust to the configurable/changed email.Anything you want to highlight for special attention from reviewers?
author.name.include?("dependabot")), so this aligns the other four providers with that existing behavior rather than introducing a new mechanism.dependabot_email,azure_commit_author_email, andbitbucket_commit_author_emailare removed / renamed to their author-name equivalents. They were only referenced withinpr_name_prefixer.rb.How will you know you've accomplished your goal?
Added a regression spec: given a GitLab history whose latest commit is authored by
dependabot[bot]with afix(deps):prefix (and the current…@users.noreply.github.comemail, notsupport@dependabot.com), the prefixer now reusesfix(deps):. Against the previous email-based code the same spec fails — it misses the commit and falls back to a genericbuild(deps):.bundle exec rspec spec/dependabot/pull_request_creator/→ 476 examples, 0 failuresbundle exec rubocopon the changed files → no offensesChecklist