Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from ipld/autorebase
Browse files Browse the repository at this point in the history
add a workflow to manually trigger a rebase of a PR opened by ipldbot
  • Loading branch information
marten-seemann authored Jan 9, 2021
2 parents 17aad86 + 3d260cc commit 738ae9e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/copy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
cfg: ${{ fromJson(needs.matrix.outputs.targets) }}
workflow: [ "go-test", "go-check" ]
workflow: [ "autorebase", "go-test", "go-check" ]
env:
WORKFLOW_DIR: "workflow-repo"
FILE: "${{ matrix.workflow }}.yml"
Expand Down Expand Up @@ -64,7 +64,11 @@ jobs:
with:
commit-message: update ${{ env.FILE }}
title: update ${{ matrix.workflow }} workflow
body: update to https://github.com/${{ github.repository }}/commit/${{ github.sha }}
body: |
update to https://github.com/${{ github.repository }}/commit/${{ github.sha }}
---
You can trigger a rebase by commenting `@ipldbot rebase`.
token: ${{ secrets.IPLDBOT_GITHUB_TOKEN }}
committer: ipldbot <ipldbot@users.noreply.github.com>
author: ipldbot <ipldbot@users.noreply.github.com>
Expand Down
22 changes: 22 additions & 0 deletions workflow-templates/autorebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Allow PRs opened by ipldbot to be rebased by commenting "@ipldbot rebase" on the PR.

on:
issue_comment:
types: [ created ]

name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && github.event.issue.user.login == 'ipldbot' && contains(github.event.comment.body, '@ipldbot rebase')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.IPLDBOT_GITHUB_TOKEN }}
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.4
env:
GITHUB_TOKEN: ${{ secrets.IPLDBOT_GITHUB_TOKEN }}

0 comments on commit 738ae9e

Please sign in to comment.