@@ -34,17 +34,20 @@ jobs:
3434 contents : write
3535 pull-requests : write
3636 runs-on : ubuntu-latest
37- if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
37+ if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.html_url != '' }}
3838 env :
3939 PR_URL : ${{ github.event.pull_request.html_url }}
4040 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4141 steps :
42- - name : Dependabot metadata
42+ -
43+ name : Dependabot metadata
4344 id : metadata
4445 uses : dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
45- - name : Auto-approve all dependabot PRs
46+ -
47+ name : Auto-approve all dependabot PRs
4648 run : gh pr review --approve "$PR_URL"
47- - name : Auto-merge dependabot PRs for development dependencies
49+ -
50+ name : Auto-merge dependabot PRs for development dependencies
4851 if : ${{ contains(steps.metadata.outputs.dependency-group, 'development-dependencies') }}
4952 run : |
5053 set +e # Don't exit on error
6568 echo "::error title=auto-merge::Failed to enable auto-merge"
6669 echo "$OUTPUT"
6770 exit $EXIT_CODE
68- - name : Auto-merge dependabot PRs for go-openapi patches
71+ -
72+ name : Auto-merge dependabot PRs for go-openapi patches
6973 if : ${{ contains(steps.metadata.outputs.dependency-group, 'go-openapi-dependencies') && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch') }}
7074 run : |
7175 set +e # Don't exit on error
8488 echo "::error title=auto-merge::Failed to enable auto-merge"
8589 echo "$OUTPUT"
8690 exit $EXIT_CODE
87- - name : Auto-merge dependabot PRs for golang.org updates
91+ -
92+ name : Auto-merge dependabot PRs for golang.org updates
8893 if : ${{ contains(steps.metadata.outputs.dependency-group, 'golang-org-dependencies') }}
8994 run : |
9095 set +e # Don't exit on error
@@ -115,21 +120,25 @@ jobs:
115120 contents : write
116121 pull-requests : write
117122 runs-on : ubuntu-latest
118- if : ${{ inputs.enable-organization-bot == 'true' && github.event.pull_request.user.login == inputs.organization-bot }}
123+ if : ${{ inputs.enable-organization-bot == 'true' && github.event.pull_request.user.login == inputs.organization-bot && github.event.pull_request.html_url != '' }}
119124 env :
120125 PR_URL : ${{ github.event.pull_request.html_url }}
121126 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122127 steps :
123- - name : Checkout repository
128+ -
129+ name : Checkout repository
124130 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
125- - name : Auto-approve all bot-go-openapi PRs
131+ -
132+ name : Auto-approve all bot-go-openapi PRs
126133 run : gh pr review --approve "$PR_URL"
127- - name : Wait for all workflow runs to complete
134+ -
135+ name : Wait for all workflow runs to complete
128136 uses : go-openapi/gh-actions/ci-jobs/wait-pending-jobs@f7ed44020a2682556ac42fa9c210142495270354 # v1.4.5
129137 with :
130138 pr-url : ${{ env.PR_URL }}
131139 github-token : ${{ secrets.GITHUB_TOKEN }}
132- - name : Auto-merge bot-go-openapi PRs
140+ -
141+ name : Auto-merge bot-go-openapi PRs
133142 run : |
134143 set +e # Don't exit on error
135144 OUTPUT=$(gh pr merge --auto --rebase "$PR_URL" 2>&1)
0 commit comments