https://github.com/rustin170506/ti-community-rebase
A rebase actions for tidb community.
https://github.com/rustin170506/ti-community-rebase
Last synced: about 1 year ago
JSON representation
A rebase actions for tidb community.
- Host: GitHub
- URL: https://github.com/rustin170506/ti-community-rebase
- Owner: Rustin170506
- License: mit
- Created: 2020-11-04T06:48:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T07:51:33.000Z (over 5 years ago)
- Last Synced: 2024-08-16T01:07:11.173Z (almost 2 years ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub action to automatically rebase PRs, inspired by [rebase](https://github.com/cirrus-actions/rebase)
After installation simply comment `/rebase` to trigger the action:

# Installation
To configure the action simply add the following lines to your `.github/workflows/rebase.yml` workflow file:
```yml
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: 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:
fetch-depth: 0
- name: ti-community-rebase
uses: tidb-community-bots/ti-community-rebase@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Restricting who can call the action
It's possible to use `author_association` field of a comment to restrict who can call the action and skip the rebase for others. Simply add the following expression to the `if` statement in your workflow file: `github.event.comment.author_association == 'MEMBER'`. See [documentation](https://developer.github.com/v4/enum/commentauthorassociation/) for a list of all available values of `author_association`.