diff --git a/.github/workflows/auto-merge-on-demand.yml b/.github/workflows/auto-merge-on-demand.yml index 47003fd..fde8619 100644 --- a/.github/workflows/auto-merge-on-demand.yml +++ b/.github/workflows/auto-merge-on-demand.yml @@ -1,8 +1,8 @@ -name: Auto Merge Scheduled / On Demand +name: Auto Merge On Demand on: - schedule: - # Workflow runs every 45 minutes - - cron: '*/45 * * * *' + issue_comment: + types: + - created workflow_dispatch: inputs: pr-number: @@ -16,7 +16,10 @@ permissions: jobs: # Get all open PRs gather-pull-requests: - if: github.repository_owner == 'sclorg' + if: | + github.repository_owner == 'sclorg' + || (contains(github.event.comment.body, '/auto-merge') + && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)) runs-on: ubuntu-latest outputs: