We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 499b323 + b31e158 commit e8c38f0Copy full SHA for e8c38f0
.github/workflows/auto-merge-dependabot.yml
@@ -24,10 +24,9 @@ jobs:
24
- name: Auto-merge Dependabot PR
25
env:
26
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
- HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
28
run: |
29
- # Get PR number from branch name
30
- PR_NUMBER=$(echo "$HEAD_BRANCH" | grep -o '[0-9]\+' || echo '')
+ # Get PR number from the workflow run event
+ PR_NUMBER=${{ github.event.workflow_run.pull_requests[0].number }}
31
32
if [ -n "$PR_NUMBER" ]; then
33
# Approve PR
0 commit comments