Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { staleGithubPRs } from "https://esm.town/v/ramkarthik/staleGithubPRs";
export const reposStaleGithubPRs = async (
repos: string[],
owner: string,
token: string,
staleSinceDaysAgo: number,
) => {
let pullRequests = [];
for (const repo of repos) {
let prs = await staleGithubPRs(
owner,
repo,
token,
staleSinceDaysAgo,
);
if (prs && prs.length > 0) {
pullRequests.push({ repo: repo, prs: prs });
}
}
return pullRequests;
};
October 23, 2023