Skip to content

Commit

Permalink
update github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Jan 17, 2024
1 parent 8698359 commit d0b1806
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/update-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
}
})
console.log(prs);
for (const pr of prs.data) {
if (pr.state !== 'open') continue;
console.log("Refreshing PR diff for #" + pr.number + " (" + pr.title + ")");
await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -34,5 +35,13 @@ jobs:
'X-GitHub-Api-Version': '2022-11-28'
}
})
break;
await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
base: 'main',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
}

0 comments on commit d0b1806

Please sign in to comment.