MCPcopy
hub / github.com/axios/axios / getContributors

Function getContributors

gulpfile.js:16–34  ·  view source on GitHub ↗
(user, repo, maxCount = 1)

Source from the content-addressed store, hash-verified

14});
15
16async function getContributors(user, repo, maxCount = 1) {
17 const contributors = (
18 await axios.get(
19 `https://api.github.com/repos/${encodeURIComponent(user)}/${encodeURIComponent(repo)}/contributors`,
20 { params: { per_page: maxCount } }
21 )
22 ).data;
23
24 return Promise.all(
25 contributors.map(async (contributor) => {
26 return {
27 ...contributor,
28 ...(
29 await axios.get(`https://api.github.com/users/${encodeURIComponent(contributor.login)}`)
30 ).data,
31 };
32 })
33 );
34}
35
36const packageJSON = gulp.task('package', async function () {
37 const CONTRIBUTION_THRESHOLD = 3;

Callers 1

gulpfile.jsFile · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected