Skip to content

Commit

Permalink
🐛 QD-10155 Stop throwing error on non-zero exit code from merge-base …
Browse files Browse the repository at this point in the history
…call
  • Loading branch information
avafanasiev authored and tiulpin committed Oct 28, 2024
1 parent 4f04143 commit 31d6f33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion scan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135166,7 +135166,9 @@ var require_utils10 = __commonJS({
"merge-base",
github2.context.payload.pull_request.base.sha,
github2.context.payload.pull_request.head.sha
]);
], {
ignoreReturnCode: true
});
if (output.exitCode === 0) {
return output.stdout.trim();
} else {
Expand Down
15 changes: 10 additions & 5 deletions scan/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,16 @@ async function getPrSha(): Promise<string> {
return process.env.QODANA_PR_SHA
}
if (github.context.payload.pull_request !== undefined) {
const output = await gitOutput([
'merge-base',
github.context.payload.pull_request.base.sha,
github.context.payload.pull_request.head.sha
])
const output = await gitOutput(
[
'merge-base',
github.context.payload.pull_request.base.sha,
github.context.payload.pull_request.head.sha
],
{
ignoreReturnCode: true
}
)
if (output.exitCode === 0) {
return output.stdout.trim()
} else {
Expand Down

0 comments on commit 31d6f33

Please sign in to comment.