Skip to content

Commit

Permalink
actions: creates an action to enable collatorators to rebase others p…
Browse files Browse the repository at this point in the history
…ull requests easily

simply respond '/rebase' on a PR and (assuming PR creater allows repo collaborators to push), it will be rebased on the latest develop. I believe this will be useful in the case of trivial rebases that are sometimes needed on a PR

Signed-off-by: pasta <pasta@dashboost.org>
  • Loading branch information
PastaPastaPasta committed Jul 17, 2021
1 parent 886024b commit 8eb5957
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
permissions:
contents: write
# pull-requests: write
# Enforce other not needed permissions are off
# actions: none
# checks: none
# deployments: none
# issues: none
# #metadata: read
# packages: none
# repository-projects: none
# security-events: none
# statuses: none
jobs:
rebase:
name: Rebase
if: (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER') && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
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: Automatic Rebase
uses: PastaPastaPasta/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8eb5957

Please sign in to comment.