Refactor auto-merge condition for Dependabot PRs

This commit is contained in:
JG2401
2026-02-16 11:34:06 +01:00
committed by GitHub
parent 8c6c62bab0
commit 7e9d9d2867

View File

@@ -14,14 +14,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check for auto-merge label
id: check
run: |
labels=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH" | tr '\n' ' ')
echo "labels=$labels" >> "$GITHUB_OUTPUT"
- name: Auto-merge - name: Auto-merge
if: contains(steps.check.outputs.labels, 'auto-merge') if: contains(github.event.pull_request.labels.*.name, 'auto-merge')
uses: fastify/github-action-merge-dependabot@v3 uses: fastify/github-action-merge-dependabot@v3
with: with:
github-token: ${{ secrets.GH_TOKEN }} github-token: ${{ secrets.GH_TOKEN }}