feat(plugins/base): split base queries to reduce GitHub API timeouts (#584)

This commit is contained in:
Simon Lecoq
2021-10-22 00:05:00 -04:00
committed by GitHub
parent f75638d3a0
commit ead8bd2eb7
14 changed files with 223 additions and 170 deletions

View File

@@ -11,58 +11,6 @@ export default function({faker, query, login = faker.internet.userName()}) {
websiteUrl:faker.internet.url(),
isHireable:faker.datatype.boolean(),
twitterUsername:login,
repositories:{totalCount:faker.datatype.number(100), totalDiskUsage:faker.datatype.number(100000)},
packages:{totalCount:faker.datatype.number(10)},
starredRepositories:{totalCount:faker.datatype.number(1000)},
watching:{totalCount:faker.datatype.number(100)},
sponsorshipsAsSponsor:{totalCount:faker.datatype.number(10)},
sponsorshipsAsMaintainer:{totalCount:faker.datatype.number(10)},
contributionsCollection:{
totalRepositoriesWithContributedCommits:faker.datatype.number(100),
totalCommitContributions:faker.datatype.number(10000),
restrictedContributionsCount:faker.datatype.number(10000),
totalIssueContributions:faker.datatype.number(100),
totalPullRequestContributions:faker.datatype.number(1000),
totalPullRequestReviewContributions:faker.datatype.number(1000),
},
calendar:{
contributionCalendar:{
weeks:[
{
contributionDays:[
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
],
},
{
contributionDays:[
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
],
},
{
contributionDays:[
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
{color:faker.random.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])},
],
},
],
},
},
repositoriesContributedTo:{totalCount:faker.datatype.number(100)},
followers:{totalCount:faker.datatype.number(1000)},
following:{totalCount:faker.datatype.number(1000)},
issueComments:{totalCount:faker.datatype.number(1000)},
organizations:{totalCount:faker.datatype.number(10)},
},
})
}