diff --git a/.github/workflows/upstream pretest.yaml b/.github/workflows/upstream pretest.yaml index 6061a0b9..c7df5ca1 100644 --- a/.github/workflows/upstream pretest.yaml +++ b/.github/workflows/upstream pretest.yaml @@ -13,6 +13,11 @@ concurrency: group: ${{ github.workflow }} cancel-in-progress: false +# TODO delete trivial subm-pretest before testing +# - One last commit at a time +# TODO find a way to hide upstream-only changes +# - Store sha on the pretest side, not subm-pretest + # There are 2 steps of adding new upstream commits: # 1. Add new commits from the PR merge ref (and possibly custom branch): to "pretest/$pr_num" in fork # 2. Add commit with submodule ref move + test changes, with this ref move: to "subm-pretest/$org_repo/$pr_num" in POCGL repo @@ -366,8 +371,9 @@ jobs: if (-not $?) { throw "git push failed" } Write-Host "Merging with ${fork_main_branch_name}:" + $fork_pretest_old_sha = git rev-parse HEAD $pr_merge_sha = git rev-parse remotes/0_official/pull/$pr_num/merge - git merge $fork_main_branch_name --no-ff --commit -m @" + git merge $fork_main_branch_name --no-ff -m @" Merge $fork_main_branch_name into $fork_branch_name meta.pr_merge_sha=$pr_merge_sha "@ @@ -376,6 +382,14 @@ jobs: if (-not $?) { throw "git push failed" } $fork_pretest_sha = git rev-parse HEAD + if ($fork_pretest_sha -eq $fork_pretest_old_sha) { + git commit -a --allow-empty -m @" + Update pretest meta + meta.pr_merge_sha=$pr_merge_sha + "@ + $fork_pretest_sha = git rev-parse HEAD + } + Pop-Location