MCPcopy Create free account
hub / github.com/github/awesome-copilot / generateContributorReport

Function generateContributorReport

eng/contributor-report.mjs:437–455  ·  view source on GitHub ↗
(username, { includeAllFiles = false } = {})

Source from the content-addressed store, hash-verified

435 * @returns {object|null}
436 */
437export const generateContributorReport = (username, { includeAllFiles = false } = {}) => {
438 console.log(`Inspecting ${username}...`);
439
440 const prs = fetchContributorMergedPrs(username, { includeAllFiles });
441 const prReports = prs
442 .map(pr => generatePRReport({ login: username }, pr, { includeAllFiles }))
443 .filter(report => report !== null);
444
445 // If no relevant PR reports and not explicitly including all files, skip the contributor entirely
446 if (prReports.length === 0 && !includeAllFiles) {
447 return null;
448 }
449
450 return {
451 username,
452 totalPRs: prs.length,
453 prs: prReports
454 };
455};
456
457/**
458 * Render a set of contributor reports as markdown for human review.

Callers 1

mainFunction · 0.85

Calls 2

generatePRReportFunction · 0.85

Tested by

no test coverage detected