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:
parent
10bb220e1d
commit
0b973c9d82
1 changed files with 10 additions and 2 deletions
12
.github/workflows/rebase.yml
vendored
12
.github/workflows/rebase.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue