Skip to content

Commit

Permalink
Adding debug info
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Dec 6, 2023
1 parent 276d645 commit 7dd6af2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7dd6af2

Please sign in to comment.