-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-node.js
26 lines (25 loc) · 1021 Bytes
/
gatsby-node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const token = process.env.VERDACCIO_TOKEN;
const contributors = require('@dianmora/contributors');
const excludebots = ['verdacciobot', 'dependabot-preview[bot]', 'dependabot[bot]', '64b2b6d12bfe4baae7dad3d01', 'greenkeeper[bot]', 'snyk-bot',
'allcontributors[bot]', 'renovate[bot]', 'undefined', 'renovate-bot'];
exports.sourceNodes = async ({
actions: { createNode },
createContentDigest,
}) => {
const result = await contributors({token: token, organization: 'verdaccio', excludebots, allowFork: false, allowPrivateRepo: false});
result.forEach((item) => {
createNode({
url: item.login,
userId: item.id,
id: `key-${item.login}`,
contributions: item.contributions,
repositories: item.repositories,
parent: null,
children: [],
internal: {
type: `Example`,
contentDigest: createContentDigest(item),
},
});
})
}