CI: Ensure treeish string works for main
skip-changelog Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
bbbf522ca0
commit
4f8d6697d6
1 changed files with 2 additions and 0 deletions
|
@ -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'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue