diff --git a/.github/workflows/auto-approve-api-docs-sync.yml b/.github/workflows/auto-approve-docs-sync.yml similarity index 50% rename from .github/workflows/auto-approve-api-docs-sync.yml rename to .github/workflows/auto-approve-docs-sync.yml index 91ccda5205..68aa3e6a42 100644 --- a/.github/workflows/auto-approve-api-docs-sync.yml +++ b/.github/workflows/auto-approve-docs-sync.yml @@ -1,4 +1,4 @@ -name: Auto-approve API docs sync PRs +name: Auto-approve generated docs sync PRs on: pull_request: @@ -11,7 +11,7 @@ permissions: pull-requests: write jobs: - approve: + approve-api-docs-sync: runs-on: ubuntu-latest if: >- github.event.pull_request.user.login == 'team-backend-foundations-bot' @@ -26,3 +26,19 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_URL: ${{ github.event.pull_request.html_url }} run: gh pr review --approve "$PR_URL" + + approve-cli-docs-sync: + runs-on: ubuntu-latest + if: >- + github.event.pull_request.user.login == 'team-miscellaneous-branch-protections' + && github.actor == 'team-miscellaneous-branch-protections' + && github.event.pull_request.head.repo.full_name == github.repository + && github.event.pull_request.head.ref == 'cli-docs-sync' + && github.event.pull_request.base.ref == 'main' + && contains(github.event.pull_request.labels.*.name, 'cli-docs-sync') + steps: + - name: Approve PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: gh pr review --approve "$PR_URL"