fix: [code-970]: add commitsha to merge api (#766)

This commit is contained in:
Calvin Lee 2023-11-03 17:40:11 +00:00 committed by Harness
parent db7655c569
commit afb21a3ca3

View File

@ -314,7 +314,10 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
{...permissionProps(permPushResult, standalone)} {...permissionProps(permPushResult, standalone)}
onClick={async () => { onClick={async () => {
if (mergeOption.method !== 'close') { if (mergeOption.method !== 'close') {
const payload: OpenapiMergePullReq = { method: mergeOption.method } const payload: OpenapiMergePullReq = {
method: mergeOption.method,
source_sha: pullRequestMetadata?.source_sha
}
mergePR(payload) mergePR(payload)
.then(onPRStateChanged) .then(onPRStateChanged)
.catch(exception => showError(getErrorMessage(exception))) .catch(exception => showError(getErrorMessage(exception)))