diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index a08708af1..eec2d8a78 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -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