Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

Commit a28c784

Browse files
Update test_and_merge.yml
1 parent 9e05aa2 commit a28c784

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/test_and_merge.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,10 @@ jobs:
4141
merge:
4242
runs-on: ubuntu-latest
4343
needs: [test]
44-
if: github.actor == 'dependabot[bot]'
44+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
4545
steps:
46-
- name: Dependabot metadata
47-
id: metadata
48-
uses: dependabot/fetch-metadata@v2
49-
with:
50-
github-token: "${{ secrets.GITHUB_TOKEN }}"
5146
- name: Enable auto-merge for Dependabot PRs
52-
run: gh pr merge --auto --merge "$PR_URL"
47+
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
5348
env:
5449
PR_URL: ${{github.event.pull_request.html_url}}
55-
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
50+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)