Skip to content

Commit 73d9e50

Browse files
authored
Add a way to skip the call to _getPR in the _getSHA function
1 parent af1b7a9 commit 73d9e50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/bundler-plugin-core/src/utils/providers/AzurePipelines.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ function _getSHA(
107107
}
108108

109109
let commit = envs?.BUILD_SOURCEVERSION ?? null;
110+
const skip_merge_commit_from_pr = Boolean(envs?.SYSTEM_SKIP_MERGE_COMMIT_FROM_PR);
110111

111-
if (_getPR(inputs, output)) {
112+
if (!skip_merge_commit_from_pr && _getPR(inputs, output)) {
112113
const mergeCommitRegex = /^[a-z0-9]{40} [a-z0-9]{40}$/;
113114
const mergeCommitMessage = childProcess
114115
.execFileSync("git", ["show", "--no-patch", "--format=%P"])

0 commit comments

Comments
 (0)