Skip to content

vtorc e2e: disable semi-sync before instance cleanup to avoid a deadlock #4893

vtorc e2e: disable semi-sync before instance cleanup to avoid a deadlock

vtorc e2e: disable semi-sync before instance cleanup to avoid a deadlock #4893

name: Auto Approval of Bot Pull Requests
on:
pull_request:
types: [opened, reopened]
permissions:
contents: read
jobs:
auto_approve:
name: Auto Approve Pull Request
runs-on: ubuntu-24.04
permissions:
pull-requests: write # only given on local PRs, forks run with `read` access
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: 'false'
- name: Auto Approve Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_DRAFT: ${{ github.event.pull_request.draft }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# here we are checking that the PR has been created by the vitess-bot[bot] account and that it is not a draft
# if there is a merge conflict in the backport, the PR will always be created as a draft, meaning we can rely
# on checking whether or not the PR is a draft
if [[ "$PR_AUTHOR" == "vitess-bot[bot]" ]] && [[ "$PR_DRAFT" == "false" ]]; then
gh pr review "$PR_NUMBER" --approve
fi