-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Feature request] Consolidate duplicate contributor names #236
Comments
This is a plugin git thing, we can consider merging contributors and assigning their email with the last one they use. We need a new option for this, and I think we can either make this opt-in or make your description as default and make the current opt-in. It should be not hard to open a pr for this, I am at covid with fever, so I would invite you to open a pr. Looking for the option ideas feed back with @pengzhanbo and @meteorlxy . |
I think we can merge |
This issue is marked as |
@Jojoshua In fact we also display the email when hovering on the name, so it actually has some value to display duplicate names: IMO it could be better to provide an option to let user customize the merging strategy, maybe something like: gitPlugin({
contributors: true,
contributorsMerging: (a, b) => {
// return false to avoid merging
if (a.name !== b.name) return false
return {
name: a.name,
email: a.email.endsWith('@personal.com') ? a.email : b.email,
commits: a.commits + b.commits,
}
},
}) Or simply provide the raw contributors array directly: gitPlugin({
contributors: true,
contributorsHandling: (contributors) => {
return contributors.filter(() => { /* whatever */ })
},
}) |
What about |
Thanks for the new function! |
Clear and concise description of the problem
It's not uncommon for enterprises to switch their internal email addresses so you will have git commits for the same name but different email addresses.
Suggested solution
The contributor names should be distinct regardless of the email address or number of commits. In the rare case it truly is actually 2 different people with the same name, having the same name twice doesn't provide any value.
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: