feat: ignore initialization of virtual merge commits

Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
This commit is contained in:
Aleksei Igrychev
2023-12-21 22:13:33 +00:00
parent 123d59749a
commit ed26ed00c3
8 changed files with 35 additions and 107 deletions

View File

@@ -31672,6 +31672,10 @@ exports.SetupKubeConfig = SetupKubeConfig;
function ProcessGitHubContext() {
if (github_1.context.eventName === 'pull_request') {
if (github_1.context.payload.pull_request) {
// Do nothing if virtual merge variable is already set
if (process.env.WERF_VIRTUAL_MERGE) {
return;
}
const baseSha = github_1.context.payload.pull_request.base.sha;
const headSha = github_1.context.payload.pull_request.head.sha;
process.env.WERF_VIRTUAL_MERGE = '1';