From f0223ab17dc162b953228b672182e040dcfb8e0a Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 5 Oct 2024 05:34:41 -0700 Subject: [PATCH] explicitly set repo name for git cliff --- .github/workflows/increment_version.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/increment_version.py b/.github/workflows/increment_version.py index 07abc51..d8ec186 100644 --- a/.github/workflows/increment_version.py +++ b/.github/workflows/increment_version.py @@ -98,18 +98,30 @@ def get_changelog( if full and changelog.exists(): old = changelog.read_text(encoding="utf-8") output = changelog - args = ["git-cliff", "--config", str(GIT_CLIFF_CONFIG), "--tag", tag] + args = [ + "git-cliff", + "--config", + str(GIT_CLIFF_CONFIG), + "--tag", + tag, + "--github-repo", + f"nRF24/{Path.cwd().name}", + ] if not full: args.append("--unreleased") output = str(RELEASE_NOTES) if branch == "v1.x": args.extend(["--ignore-tags", "[v|V]?2\\..*"]) - subprocess.run( - args + ["--output", output], - env={"FIRST_COMMIT": first_commit}, - check=True, - shell=True, - ) + try: + subprocess.run( + args + ["--output", output], + env={"FIRST_COMMIT": first_commit}, + check=True, + shell=True, + ) + except subprocess.CalledProcessError as exc: + print(exc.stdout, exc.stderr, sep="\n") + raise exc if full: new = changelog.read_text(encoding="utf-8") changes = list(unified_diff(old, new))