1212jobs :
1313 enable-automerge :
1414 # Only run on Dependabot PRs
15- # if: github.event.pull_request.user.login == 'dependabot[bot]'
15+ if : github.event.pull_request.user.login == 'dependabot[bot]'
1616 runs-on : ubuntu-latest
1717 permissions :
1818 contents : write
1919 pull-requests : write
2020
2121 steps :
22- # - name: Fetch Dependabot metadata
23- # id: metadata
24- # uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
25- # with:
26- # github-token: ${{ secrets.GITHUB_TOKEN }}
27-
28- # - name: Auto-approve Dependabot PR
29- # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
30- # uses: hmarr/auto-approve-action@v4
31- # with:
32- # github-token: ${{ secrets.GITHUB_TOKEN }}
22+ - name : Fetch Dependabot metadata
23+ id : metadata
24+ uses : dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
25+ with :
26+ github-token : ${{ secrets.GITHUB_TOKEN }}
3327
34- # - name: Enable auto-merge for Dependabot PRs
35- # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
36- # run: gh pr merge --auto --squash "$PR_URL"
37- # env:
38- # PR_URL: ${{ github.event.pull_request.html_url }}
39- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
41- - name : Slack Notification
42- uses : slackapi/slack-github-action@v2.1.1
28+ - name : Auto-approve Dependabot PR
29+ uses : hmarr/auto-approve-action@v4
4330 with :
44- webhook : ${{ secrets.DEPENDABOT_SLACK_WEBHOOK_URL }}
45- webhook-type : incoming-webhook
46- payload : |
47- text : Hello from github
48-
31+ github-token : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Enable auto-merge for Dependabot PRs
34+ if : steps.metadata.outputs.update-type == 'version-update:semver-patch'
35+ run : gh pr merge --auto --squash "$PR_URL"
36+ env :
37+ PR_URL : ${{ github.event.pull_request.html_url }}
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments