Skip to content

Commit 60ece3a

Browse files
committed
fix: correctly use github.event.action to fetch the type of event
`github.event.pull_request` is the pull request object not the event object, so `.action` always resolves to null and breaks auto-merge. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent b109a60 commit 60ece3a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

workflow-templates/dependabot-approve-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ jobs:
5353
# Enable GitHub auto merge
5454
- name: Auto merge
5555
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # 2.0.0
56-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.pull_request.action == 'opened' || github.event.pull_request.action == 'reopened')
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened')
5757
with:
5858
github-token: ${{ secrets.GITHUB_TOKEN }}

workflow-templates/renovate-approve-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ jobs:
5353
# Enable GitHub auto merge
5454
- name: Auto merge
5555
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # 2.0.0
56-
if: startsWith(steps.branchname.outputs.branch, 'renovate/') && (github.event.pull_request.action == 'opened' || github.event.pull_request.action == 'reopened')
56+
if: startsWith(steps.branchname.outputs.branch, 'renovate/') && (github.event.action == 'opened' || github.event.action == 'reopened')
5757
with:
5858
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)