feat(plugins/languages): count verified commits using user's gpg keys (#911)

This commit is contained in:
Simon Lecoq
2022-03-10 03:29:31 +01:00
committed by GitHub
parent e60d74af40
commit 96ea0beb95
5 changed files with 94 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
/**Mocked data */
export default function({ faker }, target, that, [{ username }]) {
console.debug("metrics/compute/mocks > mocking rest api result > rest.users.listGpgKeysForUser")
return ({
status: 200,
url: `https://api.github.com/users/${username}/`,
headers: {
server: "GitHub.com",
status: "200 OK",
"x-oauth-scopes": "repo",
},
data: [
{
key_id: faker.datatype.hexaDecimal(16),
raw_key: "-----BEGIN PGP PUBLIC KEY BLOCK-----\n(dummy content)\n-----END PGP PUBLIC KEY BLOCK-----",
emails: [
{
email: faker.internet.email(),
verified: true
}
]
}
],
})
}