Closed lukemassa closed 12 months ago
@lukemassa Sorry for delay. Have you checked this one? https://github.com/vuepress/vuepress-next/issues/537
I am actually "upvote" for this kind of changes, it's common to merge a pr and create a new commit through things like github, and people can choose to hide their emails:
It's definitely better if we can recognize and remove them in plugin.
Maybe we'd better merge the commits count instead of simply remove it?
Yes, we can merge it if a same name already exists in same file commit, and maybe just remove the email field if not found.
I added some code to sum up the contributions:
plugin-git % pnpm build && node -e 'import("./lib/node/utils/getContributors.js").then((mod)=>{mod.getContributors(["runatlantis.io/docs/README.md"], "/Users/lukemassa/atlantis").then((value)=>{console.log(value)})})'
> @vuepress/plugin-git@2.0.0-beta.63 build /Users/lukemassa/vuepress-next/ecosystem/plugin-git
> tsc -b tsconfig.build.json
[ { name: 'Luke Kysow', email: 'lkysow@gmail.com', commits: 8 } ]
Thanks for your contributions! ❤️
Before submitting the PR, please make sure you do the following
close #123
).What is the purpose of this pull request?
Description
A user might use multiple mechanisms of contributing code, some directly using their username and email, and others automated, typically with a "noreply" email address. Right now, this causes pages that use the "contributor" to have this somewhat awkward field:
This change treats the noreply addresses as the "same contributor", if one exists with the same name.
If a file has no such "noreply" addresses, or if there is no corresponding "normal" contributor, the field is unchanged.
Discussion: https://github.com/vuepress/vuepress-next/discussions/1336
Changes
Before
After