Skip to content

Commit e123e01

Browse files
committed
fix(ci): use PR author instead of actor for auto-merge check
The workflow was using github.actor which changes when someone else pushes to a dependabot/renovate branch (e.g., to fix conflicts). Using github.event.pull_request.user.login ensures we check the actual PR author regardless of who triggered the synchronize event.
1 parent b9493bb commit e123e01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/auto-merge-deps.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
auto-merge:
1515
name: Auto-merge dependency PRs
1616
runs-on: ubuntu-latest
17-
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
17+
# Use PR author login instead of github.actor to handle synchronize events
18+
# when someone else pushes to the dependabot/renovate branch
19+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
1820

1921
steps:
2022
- name: Harden Runner
@@ -24,7 +26,7 @@ jobs:
2426

2527
- name: Dependabot metadata
2628
id: metadata
27-
if: github.actor == 'dependabot[bot]'
29+
if: github.event.pull_request.user.login == 'dependabot[bot]'
2830
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
2931
with:
3032
github-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)