File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Dependabot auto-merge"
2+
3+ on :
4+ pull_request :
5+
6+ permissions :
7+ contents : " write"
8+ pull-requests : " write"
9+
10+ jobs :
11+ dependabot :
12+ runs-on : " ubuntu-latest"
13+ if : " github.event.pull_request.user.login == 'dependabot[bot]'"
14+
15+ steps :
16+ - name : " Fetch Dependabot metadata"
17+ id : " metadata"
18+ uses : " dependabot/fetch-metadata@v2"
19+ with :
20+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
21+
22+ - name : " Approve Dependabot PR"
23+ if : " steps.metadata.outputs.update-type == 'version-update:semver-patch'"
24+ run : " gh pr review --approve \" $PR_URL\" "
25+ env :
26+ PR_URL : " ${{ github.event.pull_request.html_url }}"
27+ GH_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
28+
29+ - name : " Enable auto-merge"
30+ if : " steps.metadata.outputs.update-type == 'version-update:semver-patch'"
31+ run : " gh pr merge --auto --squash \" $PR_URL\" "
32+ env :
33+ PR_URL : " ${{ github.event.pull_request.html_url }}"
34+ GH_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ permissions:
55
66on :
77 workflow_run :
8- workflows : ["Lint and Test"]
8+ workflows : ["Lint and Test", "Dependabot auto-merge" ]
99 types : [completed]
1010
1111jobs :
You can’t perform that action at this time.
0 commit comments