fix: [CODE-3280] ref target branch for revert PR (#3713)

* fix: [CODE-3280] ref target branch for revert PR
This commit is contained in:
Ritik Kapoor 2025-04-22 14:33:25 +00:00 committed by Harness
parent 2f3367904a
commit 0d478a34cc

View File

@ -50,7 +50,7 @@ export const RevertPRButton: React.FC<RevertPRButtonProps> = ({ pullRequestMetad
history.push(
routes.toCODECompare({
repoPath: repoMetadata?.path as string,
diffRefs: makeDiffRefs(repoMetadata?.default_branch as string, data.branch)
diffRefs: makeDiffRefs(pullRequestMetadata?.target_branch as string, data.branch)
})
)
showSuccess(getString('pr.revertBranchSuccess', { branch: data.branch }), 3000)
@ -63,7 +63,7 @@ export const RevertPRButton: React.FC<RevertPRButtonProps> = ({ pullRequestMetad
history.push(
routes.toCODECompare({
repoPath: repoMetadata?.path as string,
diffRefs: makeDiffRefs(repoMetadata?.default_branch as string, branchName)
diffRefs: makeDiffRefs(pullRequestMetadata?.target_branch as string, branchName)
})
)
}