Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
on:
push:
branches:
- master
jobs:
update-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@0.9.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const prsResponse = await github.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
});
await Promise.all(prsResponse.data.map(async (pr) => {
return github.pulls.updateBranch({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
});
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment