Skip to content

Commit

Permalink
fix contributors issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadit19 committed Sep 14, 2024
1 parent 65a3ecc commit e8e7eea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion _includes/footer_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,17 @@
path = 'index.md'
}
const url = `https://api.github.com/repos/astroclubiitk/wiki/commits?path=${path}`
const skippedNames = new Set(['dependabot', 'github-actions', 'github'])
fetch(url)
.then(response => response.json())
.then(data => {
const names = data.map(commit => commit.commit.committer.name.toLowerCase())
const names = data
.map(commit => {
const userName =
commit?.author?.login || commit?.commit?.author?.name
return userName?.toLowerCase()
})
.filter(name => name !== undefined && !skippedNames.has(name))
const uniqueNames = [...new Set(names)]
const links = uniqueNames.map(
name =>
Expand Down

0 comments on commit e8e7eea

Please sign in to comment.