CI: Ensure treeish string works for main
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled

skip-changelog

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-12-30 21:07:43 +01:00
parent bbbf522ca0
commit 4f8d6697d6
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -15,6 +15,8 @@ if __name__ == '__main__':
sys.exit(0)
treeish = 'main..'
if os.environ['CI_PIPELINE_SOURCE'] == 'push' and os.environ['CI_COMMIT_REF_NAME'] == 'main':
treeish = '{}..'.format(os.environ['CI_COMMIT_BEFORE_SHA'])
if os.environ['CI_PIPELINE_SOURCE'] == 'merge_request_event':
treeish = '{}..'.format(os.environ['CI_MERGE_REQUEST_DIFF_BASE_SHA'])