This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a workflow to manually trigger a rebase of a PR opened by ipldbot
This is useful in repositories where the update of a workflow initially fails, and the problem is subsequently fixed. It's necessary to rebase the PR updating the workflow to make sure that all tests now actually pass. The new workflow (which will distribited to every participating repo) achieves this by running on every issue comment, and triggers a rebase if the comment was made on a PR opened by ipldbot, and it contains the keywords "@ipldbot rebase".
- Loading branch information
1 parent
17aad86
commit 3d260cc
Showing
2 changed files
with
28 additions
and
2 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 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,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 }} |