Created
April 8, 2020 10:50
-
-
Save patrickdet/9e5fcdf674d5679853dbd5d2de2011b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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