|
1 | 1 | module.exports = async ({ github, context }) => { |
2 | 2 | const { PACKAGE, META } = process.env |
3 | 3 |
|
4 | | - const [{ data: currrentTags }, { data: upstreamTags }] = await Promise.all([ |
| 4 | + const [ |
| 5 | + { data: currrentTags1 }, |
| 6 | + { data: currrentTags2 }, |
| 7 | + { data: upstreamTags1 }, |
| 8 | + { data: upstreamTags2 }, |
| 9 | + ] = await Promise.all([ |
5 | 10 | github.rest.repos.listTags({ |
6 | 11 | owner: context.repo.owner, |
7 | 12 | repo: META.substring(META.indexOf('/') + 1), |
8 | 13 | per_page: 100, |
| 14 | + page: 1, |
| 15 | + }), |
| 16 | + github.rest.repos.listTags({ |
| 17 | + owner: context.repo.owner, |
| 18 | + repo: META.substring(META.indexOf('/') + 1), |
| 19 | + per_page: 100, |
| 20 | + page: 2, |
9 | 21 | }), |
10 | 22 | github.rest.repos.listTags({ |
11 | 23 | owner: context.repo.owner, |
12 | 24 | repo: PACKAGE.substring(PACKAGE.indexOf('/') + 1), |
13 | 25 | per_page: 100, |
| 26 | + page: 1, |
| 27 | + }), |
| 28 | + github.rest.repos.listTags({ |
| 29 | + owner: context.repo.owner, |
| 30 | + repo: PACKAGE.substring(PACKAGE.indexOf('/') + 1), |
| 31 | + per_page: 100, |
| 32 | + page: 2, |
14 | 33 | }), |
15 | 34 | ]) |
16 | 35 |
|
| 36 | + const currrentTags = currrentTags1.concat(currrentTags2) |
| 37 | + const upstreamTags = upstreamTags1.concat(upstreamTags2) |
| 38 | + |
17 | 39 | const targetTags = await Promise.allSettled( |
18 | 40 | upstreamTags |
19 | 41 | .filter((tag) => !currrentTags.find((t) => t.name === tag.name)) |
|
0 commit comments