File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Auto Approval of Bot Pull Requests
2
+ on :
3
+ pull_request :
4
+ types : [opened, reopened]
5
+
6
+ jobs :
7
+ auto_approve :
8
+ name : Auto Approve Pull Request
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v3
13
+
14
+ - name : Auto Approve Pull Request
15
+ env :
16
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
17
+ run : |
18
+ # here we are checking that the PR has been created by the vitess-bot[bot] account and that it is not a draft
19
+ # if there is a merge conflict in the backport, the PR will always be created as a draft, meaning we can rely
20
+ # on checking whether or not the PR is a draft
21
+ if [[ "${{github.event.pull_request.user.login}}" == "vitess-bot[bot]" ]] && [[ "${{github.event.pull_request.draft}}" == "false" ]]; then
22
+ gh pr review ${{ github.event.pull_request.number }} --approve
23
+ fi
You can’t perform that action at this time.
0 commit comments