File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 4242 run : |
4343 COMMIT_TITLE="ci: 🤖 Update test matrix with new releases"
4444 DATE=`date +%m/%d`
45- BRANCH_NAME="toxgen/update"
45+ BRANCH_NAME="toxgen/update-`date +%m-%d` "
4646
4747 git checkout -B "$BRANCH_NAME"
4848 git add --all
@@ -78,20 +78,21 @@ jobs:
7878
7979 // Close existing toxgen PRs as they're now obsolete
8080
81- const { data: existingPRs } = await github.rest.pulls.list( {
81+ const existingPRs = await github.paginate(github. rest.pulls.list, {
8282 owner: context.repo.owner,
8383 repo: context.repo.repo,
84- head: `${context.repo.owner}:${branchName}`,
8584 state: 'open'
8685 });
8786
8887 for (const pr of existingPRs) {
89- await github.rest.pulls.update({
90- owner: context.repo.owner,
91- repo: context.repo.repo,
92- pull_number: pr.number,
93- state: 'closed'
94- })
88+ if (pr.head.ref.startsWith('toxgen/')) {
89+ await github.rest.pulls.update({
90+ owner: context.repo.owner,
91+ repo: context.repo.repo,
92+ pull_number: pr.number,
93+ state: 'closed'
94+ })
95+ }
9596 };
9697
9798 const { data: pr } = await github.rest.pulls.create({
You can’t perform that action at this time.
0 commit comments