From a2bceb3164077e1f40b266435fcbb450a12a2220 Mon Sep 17 00:00:00 2001 From: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:37:47 +0000 Subject: [PATCH] Adds AUTHOR_LOGIN test for docs-bot (#47499) --- .github/workflows/ready-for-doc-review.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ready-for-doc-review.yml b/.github/workflows/ready-for-doc-review.yml index 4d8d610af1..958ee59a60 100644 --- a/.github/workflows/ready-for-doc-review.yml +++ b/.github/workflows/ready-for-doc-review.yml @@ -35,6 +35,14 @@ jobs: - name: Install dependencies run: npm install @octokit/graphql + - name: Set AUTHOR_LOGIN + run: | + if [[ "${{ github.event.pull_request.assignee.login && github.event.pull_request.user.login == 'docs-bot' }}" ]]; then + echo "AUTHOR_LOGIN=${{ github.event.pull_request.assignee.login }}" >> $GITHUB_ENV + else + echo "AUTHOR_LOGIN=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV + fi + - name: Run script run: | node src/workflows/ready-for-docs-review.js @@ -43,7 +51,6 @@ jobs: PROJECT_NUMBER: 2936 ORGANIZATION: 'github' ITEM_NODE_ID: ${{ github.event.pull_request.node_id }} - AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }} REPO: ${{ github.event.pull_request.base.repo.full_name }} # Since the projects API is still in beta, use the old workflow if something fails