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>
This commit is contained in:
Jacob Herrington 2020-07-03 10:49:40 -05:00 committed by GitHub
parent 10bb220e1d
commit 0b973c9d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,9 @@
# https://github.com/marketplace/actions/automatic-rebase (https://github.com/cirrus-actions/rebase)
# 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]
@ -6,7 +11,10 @@ name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
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