Skip to content

Commit

Permalink
fix(projects): fix the repeat contributor
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Aug 23, 2023
1 parent 3320878 commit c0fb5ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
with:
node-version: 18.x

- run: npx githublogen
- run: npx githublogen@latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
9 changes: 8 additions & 1 deletion src/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ function createContributorLine(contributors: ResolvedAuthor[]) {
let loginLine = '';
let unLoginLine = '';

contributors.forEach((contributor, index) => {
const contributorMap = new Map<string, ResolvedAuthor>();
contributors.forEach(contributor => {
contributorMap.set(contributor.email, contributor);
});

const filteredContributors = Array.from(contributorMap.values());

filteredContributors.forEach((contributor, index) => {
const { name, email, login } = contributor;

if (!login) {
Expand Down

0 comments on commit c0fb5ce

Please sign in to comment.