This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: migrate to new autorebase strategy (#26)
- Loading branch information
1 parent
b6f15da
commit 64ea964
Showing
4 changed files
with
50 additions
and
31 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Keeps the current branch up-to-date by rebasing to master when necessary | ||
name: Automatic Rebase | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
rebase-to-master: | ||
name: Rebase to Master | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | ||
|
||
- name: Find Pull Request | ||
id: find-pr | ||
uses: kylorhall/find-github-pull-request@v1.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commitSha: ${{ github.sha }} | ||
allowClosed: false | ||
failIfNotFound: false | ||
|
||
- name: Rebase Pull Request | ||
if: ${{ steps.find-pr.outputs.number != '' }} | ||
uses: voiceflow/rebase-many@v1.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBERS: ${{ steps.find-pr.outputs.number }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Keeps all incoming branches up-to-date by rebasing to master when necessary | ||
name: Automatic Rebase All Branches | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
# When master updates, rebase all open pull requests | ||
rebase-all-to-master: | ||
name: Rebase All to Master | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Rebase All Incoming PRs | ||
uses: voiceflow/rebase-incoming@v1.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
comment-on-failure: 'true' |