Skip to content

Instantly share code, notes, and snippets.

@patrickdet
Created April 8, 2020 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickdet/9e5fcdf674d5679853dbd5d2de2011b0 to your computer and use it in GitHub Desktop.
Save patrickdet/9e5fcdf674d5679853dbd5d2de2011b0 to your computer and use it in GitHub Desktop.
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