From 4f8d6697d6bfc4bae16e1d877841708c280918c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 30 Dec 2024 21:07:43 +0100 Subject: [PATCH] CI: Ensure treeish string works for main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit skip-changelog Signed-off-by: Maxime “pep” Buquet --- .forgejo/workflows/check-changelog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.forgejo/workflows/check-changelog.py b/.forgejo/workflows/check-changelog.py index 6f23e2d9..484373df 100755 --- a/.forgejo/workflows/check-changelog.py +++ b/.forgejo/workflows/check-changelog.py @@ -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'])