Skip to content

fix: handle closed PR status not showing properly#102

Open
Rizina wants to merge 2 commits intoleapfrogtechnology:masterfrom
Rizina:fix/closed-pr
Open

fix: handle closed PR status not showing properly#102
Rizina wants to merge 2 commits intoleapfrogtechnology:masterfrom
Rizina:fix/closed-pr

Conversation

@Rizina
Copy link
Copy Markdown

@Rizina Rizina commented Oct 28, 2023

Fixes #101

Updated the code to properly identify the closed vs merged PRs

Screenshot 2023-10-28 at 6 39 34 PM

@aws-amplify-ap-south-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-102.d1r8cuv7fofw0h.amplifyapp.com

Copy link
Copy Markdown
Member

@sbimochan sbimochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like github do not provide merged state. ref

<MergeStatus open={pullRequest.state === ISSUE_STATUS.OPEN} merged={pullRequest.state === ISSUE_STATUS.CLOSED} />
<MergeStatus
open={pullRequest.state === ISSUE_STATUS.OPEN}
merged={pullRequest.state === ISSUE_STATUS.CLOSED && pullRequest.pull_request.merged_at}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
merged={pullRequest.state === ISSUE_STATUS.CLOSED && pullRequest.pull_request.merged_at}
merged={pullRequest.state === ISSUE_STATUS.CLOSED && !!pullRequest.pull_request.merged_at}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect identification of closed PRs

2 participants