Skip to content

Apache DataFusion SQL Query Engine

ARROW-8575: [Developer] Add issue_comment workflow to rebase a PR

Neal Richardson53e955774551
diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml
index ded6fa3b4d..838c3c916b 100644
--- a/.github/workflows/comment_bot.yml
+++ b/.github/workflows/comment_bot.yml
@@ -27,7 +27,7 @@ on:
jobs:
crossbow:
name: Listen!
- if: startsWith(github.event.comment.body, '@github-actions')
+ if: startsWith(github.event.comment.body, '@github-actions crossbow')
runs-on: ubuntu-latest
steps:
- name: Checkout Arrow
@@ -56,7 +56,7 @@ jobs:
autotune:
name: "Fix all the things"
- if: startsWith(github.event.comment.body, 'autotune')
+ if: startsWith(github.event.comment.body, '@github-actions autotune')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -124,3 +124,25 @@ jobs:
- uses: r-lib/actions/pr-push@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
+
+ rebase:
+ name: "Rebase"
+ if: startsWith(github.event.comment.body, '@github-actions rebase')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: r-lib/actions/pr-fetch@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Rebase on ${{ github.repository }} master
+ run: |
+ set -ex
+ git config user.name "$(git log -1 --pretty=format:%an)"
+ git config user.email "$(git log -1 --pretty=format:%ae)"
+ git remote add upstream https://github.com/${{ github.repository }}
+ git fetch --unshallow upstream master
+ git rebase upstream/master
+ - uses: r-lib/actions/pr-push@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ args: "--force"