Disable Review button when PR is draft (#272)

Co-authored-by: Tan Nhu <tnhu@users.noreply.github.com>
This commit is contained in:
Tan Nhu 2023-01-31 09:10:53 -08:00 committed by GitHub
parent 77f1463f2c
commit c12775862b
2 changed files with 3 additions and 2 deletions

View File

@ -195,7 +195,7 @@ export const Changes: React.FC<ChangesProps> = ({
<ReviewDecisionButton <ReviewDecisionButton
repoMetadata={repoMetadata} repoMetadata={repoMetadata}
pullRequestMetadata={pullRequestMetadata} pullRequestMetadata={pullRequestMetadata}
shouldHide={readOnly || pullRequestMetadata?.state === 'merged'} shouldHide={readOnly || pullRequestMetadata?.state === 'merged' || !!pullRequestMetadata?.is_draft}
/> />
</Layout.Horizontal> </Layout.Horizontal>
</Container> </Container>

View File

@ -414,7 +414,8 @@ export const DiffViewer: React.FC<DiffViewerProps> = ({
showError, showError,
updateComment, updateComment,
deleteComment, deleteComment,
confirmAct confirmAct,
onCommentUpdate
] ]
) )