The great refactor (#82)

This commit is contained in:
Simon Lecoq
2021-01-30 12:31:09 +01:00
committed by GitHub
parent f8c6d19a4e
commit 682e43e10b
158 changed files with 6738 additions and 5022 deletions

View File

@@ -0,0 +1,37 @@
/** Mocked data */
export default function ({faker, query, login = faker.internet.userName()}) {
console.debug(`metrics/compute/mocks > mocking graphql api result > stars/default`)
return ({
user:{
starredRepositories:{
edges:[
{
starredAt:`${faker.date.recent(14)}`,
node:{
description:"📊 An image generator with 20+ metrics about your GitHub account such as activity, community, repositories, coding habits, website performances, music played, starred topics, etc. that you can put on your profile or elsewhere !",
forkCount:faker.random.number(100),
isFork:false,
issues:{
totalCount:faker.random.number(100),
},
nameWithOwner:"lowlighter/metrics",
openGraphImageUrl:"https://repository-images.githubusercontent.com/293860197/7fd72080-496d-11eb-8fe0-238b38a0746a",
pullRequests:{
totalCount:faker.random.number(100),
},
stargazerCount:faker.random.number(10000),
licenseInfo:{
nickname:null,
name:"MIT License"
},
primaryLanguage:{
color:"#f1e05a",
name:"JavaScript"
}
}
},
]
}
}
})
}