Skip to content

Commit 4c06854

Browse files
committed
Disable schedule for auto-merge-on-demand.
Allow run it on comment '/auto-merge-on-demant' Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 5799ce1 commit 4c06854

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/auto-merge-on-demand.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Auto Merge Scheduled / On Demand
22
on:
3-
schedule:
4-
# Workflow runs every 45 minutes
5-
- cron: '*/45 * * * *'
3+
issue_comment:
4+
types:
5+
- created
66
workflow_dispatch:
77
inputs:
88
pr-number:
@@ -16,7 +16,10 @@ permissions:
1616
jobs:
1717
# Get all open PRs
1818
gather-pull-requests:
19-
if: github.repository_owner == 'sclorg'
19+
if: |
20+
github.repository_owner == 'sclorg'
21+
&& (contains(github.event.comment.body, '/auto-merge-on-demand')
22+
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
2023
runs-on: ubuntu-latest
2124

2225
outputs:
@@ -44,7 +47,7 @@ jobs:
4447
name: Parse manual input
4548
run: |
4649
# shellcheck disable=SC2086
47-
echo "result="[ ${{ inputs.pr-number }} ]"" >> $GITHUB_OUTPUT
50+
echo "result="[ ${{ github.event.issue.number }} ]"" >> $GITHUB_OUTPUT
4851
shell: bash
4952

5053
validate-pr:

0 commit comments

Comments
 (0)