Skip to content

Commit

Permalink
fix(contributors): blacklists contributors from automated accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Feb 12, 2021
1 parent 36bd3e8 commit 6c57ec5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/utils/github.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
const fetch = require("node-fetch")

// List of Github users we don't want to be shown
// in the "contributors" section of the docs.

const BLACKLISTED_LOGINS = [
"web-flow", // # https://github.com/web-flow
]

const getContributors = (commits = []) => {
let contributors = {}

Expand Down Expand Up @@ -42,12 +49,9 @@ const getContributors = (commits = []) => {
.sort((a, b) => {
return b.commits - a.commits
})
.filter(c => c !== undefined)
.filter(c => c !== undefined && BLACKLISTED_LOGINS.indexOf(c.login) === -1)
}

/**
* For now, we'll just pass along the same commits we get back from the API.
*/
const getCommits = commits => {
let results = []
for (let i = 0; i < commits.length; i++) {
Expand Down

0 comments on commit 6c57ec5

Please sign in to comment.