MCPcopy Create free account
hub / github.com/appium/appium / main

Function main

scripts/github-contrib-stats.mjs:306–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304}
305
306async function main() {
307 const token = process.env.GITHUB_TOKEN;
308 if (!token) {
309 log.warn('GITHUB_TOKEN not provided - using unauthenticated requests');
310 }
311
312 const dateRange = getLastMonthDateRange();
313 log.info(`Collecting GitHub contribution statistics for ${dateRange.from} to ${dateRange.to}`);
314
315 // Get merged pull requests using GitHub search API
316 log.info('Fetching merged pull requests using GitHub search API...');
317 const allPullRequests = await getMergedPullRequestsFromSearch(dateRange, token);
318 log.info(`Found ${allPullRequests.length} merged pull requests across all repositories`);
319
320 const generatedAt = new Date().toISOString();
321
322 const sortedPullRequests = sortPullRequests(allPullRequests);
323
324 // Output Slack-formatted message to stdout
325 const slackMessage = formatSlackMessage(sortedPullRequests, dateRange.from, dateRange.to, generatedAt);
326
327 // eslint-disable-next-line no-console
328 console.log(JSON.stringify(slackMessage, null, 2));
329 log.info('All done!');
330}
331
332await main();
333

Callers 1

Calls 7

sortPullRequestsFunction · 0.85
getLastMonthDateRangeFunction · 0.70
formatSlackMessageFunction · 0.70
warnMethod · 0.65
infoMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected