Skip to content

Commit

Permalink
ARC-1428: Assert optional when getting PR review status (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
atrigueiro authored Jun 15, 2022
1 parent 7e110a6 commit 68cebb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transforms/transform-pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function mapReviews(reviews: Octokit.PullsListReviewsResponse = []) {
if (!usernames[author?.login]) {
usernames[author?.login] = {
...getJiraAuthor(author),
approvalStatus: review.state === "APPROVED" ? "APPROVED" : "UNAPPROVED"
approvalStatus: review?.state === "APPROVED" ? "APPROVED" : "UNAPPROVED"
};
acc.push(usernames[author?.login]);
// If user is already added (not unique) but the previous approval status is different than APPROVED and current approval status is APPROVED, updates approval status.
Expand Down

0 comments on commit 68cebb5

Please sign in to comment.