From 7dd6af2a2df651c2a7215e8875d7d56b5fbf24e4 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 6 Dec 2023 13:34:37 -0600 Subject: [PATCH] Adding debug info Signed-off-by: Peter Nied --- .github/workflows/test.yml | 2 +- dist/index.js | 2 ++ index.js | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61489e0..01198e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,5 +125,5 @@ jobs: mock-approvers: 'peternied bob kelly' mock-pr-number: 42 - - if: steps.approved-by-required-users.outcome != 'success' || steps.approved-by-required-users.outputs.maintainer-approvals != 'peternied bob kelly' + - if: steps.approved-by-required-users.outcome != 'success' || steps.approved-by-required-users.outputs.maintainer-approvals != ' ' run: echo "Unexpected outcome:${{ steps.approved-by-required-users.outcome }} or maintainer-approvals:${{steps.approved-by-required-users.outputs.maintainer-approvals}}" diff --git a/dist/index.js b/dist/index.js index 0d488e1..b0661bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -36741,10 +36741,12 @@ async function run() { owner: github.context.repo.owner, repo: github.context.repo.repo }); + console.log(`listReviews response:\n ${JSON.stringify(reviewers)}`); const approvers = reviewers .filter(reviewer => reviewer.state === 'APPROVED' && reviewer.user?.login) .map(reviewer => reviewer.user?.login) + console.log(`filered to approvers:\n ${JSON.stringify(approvers)}`); pullRequestApprovers = approvers; } diff --git a/index.js b/index.js index 7a91315..3b8c58d 100644 --- a/index.js +++ b/index.js @@ -32,10 +32,12 @@ async function run() { owner: github.context.repo.owner, repo: github.context.repo.repo }); + console.log(`listReviews response:\n ${JSON.stringify(reviewers)}`); const approvers = reviewers .filter(reviewer => reviewer.state === 'APPROVED' && reviewer.user?.login) .map(reviewer => reviewer.user?.login) + console.log(`filered to approvers:\n ${JSON.stringify(approvers)}`); pullRequestApprovers = approvers; }