docbrown/.github/workflows/rebase.yml
Jacob Herrington 0b973c9d82
Allow organization owners to use the Automatic Rebase workflow (#9090)
* Allow org owners to kick off automatic rebase

I suspect without this change PBJ couldn't kick off the automatic rebase
workflow.

This also includes a tweak to our method for determining if this is a
comment on a PR. I personally think this method is more explicit and
therefore readable.

* Add explanatory comment to rebase workflow

This might help someone determine what the workflow does at a glance, it
also documents a slightly unexpected caveat: The workflow can't be
triggered if your organization membership is private.

* Trigger Travis

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-07-03 10:49:40 -05:00

26 lines
898 B
YAML

# This workflow allows an organization member or owner to kickoff an automated
# rebase by commenting on a pull request with "/rebase". In order for the
# workflow to run, organization membership must be set to public!
# https://github.com/marketplace/actions/automatic-rebase (https://github.com/cirrus-actions/rebase)
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: contains(github.event.comment.html_url, '/pull/') &&
startsWith(github.event.comment.body, '/rebase') &&
(github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'OWNER')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}