An open API service indexing awesome lists of open source software.

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.

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:

![rebase-action](https://user-images.githubusercontent.com/989066/51547853-14a57b00-1e35-11e9-841d-33114f0f0bd5.gif)

# 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`.