File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 3535 result-encoding : string
3636 debug : true
3737 script : |
38- const pullsResp = await github.paginate(github.rest.pulls.list, {
38+ const timeRange = parseInt("24") * 60 * 60 * 1000;
39+ const sinceTime = new Date(Date.now() - timeRange).toISOString();
40+ const input_labels = "";
41+ const labels = input_labels
42+ ? input_labels.split(/[,\n]/).map(label => label.trim())
43+ : [];
44+
45+ const iterator = await github.paginate.iterator(github.rest.pulls.list, {
3946 owner: "pytorch",
4047 repo: "pytorch",
4148 state: "open",
4451 per_page: 100,
4552 });
4653
47- const timeRange = parseInt("24") * 60 * 60 * 1000;
48- const sinceTime = new Date(Date.now() - timeRange).toISOString();
49- const input_labels = "";
50- const labels = input_labels
51- ? input_labels.split(/[,\n]/).map(label => label.trim())
52- : [];
53-
5454 const prs = [];
55- for await (const resp of pullsResp ) {
55+ for await (const resp of iterator ) {
5656 const filtered_prs = resp.data.filter(pr => {
5757 const hasLabel = labels.length === 0
5858 || labels.every(label => pr.labels.some(prLabel => prLabel.name === label));
You can’t perform that action at this time.
0 commit comments