Skip to content

Commit

Permalink
fix: [code-1153]: fix recheck condition (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlee01 authored and Harness committed Dec 2, 2023
1 parent 6174525 commit 32620e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/PullRequest/Conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const Conversation: React.FC<ConversationProps> = ({
boxClassName={css.commentBox}
editorClassName={css.commentEditor}
commentItems={[]}
currentUserName={currentUser.display_name}
currentUserName={currentUser.display_name || currentUser.email || ''}
resetOnSave
hideCancel={false}
setDirty={setDirtyNewComment}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
})
}
}

useEffect(() => {
dryMerge() // eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
// recheck PR in case source SHA changed or PR was marked as unchecked
// TODO: optimize call to handle all causes and avoid double calls by keeping track of SHA
dryMerge()
}, [unchecked, pullRequestMetadata?.source_sha]) // eslint-disable-next-line react-hooks/exhaustive-deps

useEffect(() => {
// dryMerge()
const intervalId = setInterval(async () => {
Expand Down Expand Up @@ -208,6 +212,7 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
setMergeOption(mergeOptions[3])
} // eslint-disable-next-line react-hooks/exhaustive-deps
}, [allowedStrats])

const [draftOption, setDraftOption] = useState<PRDraftOption>(draftOptions[0])
const permPushResult = hooks?.usePermissionTranslate?.(
{
Expand Down

0 comments on commit 32620e8

Please sign in to comment.