diff --git a/contentctl/actions/release_notes.py b/contentctl/actions/release_notes.py index 859fcf87..03eeb477 100644 --- a/contentctl/actions/release_notes.py +++ b/contentctl/actions/release_notes.py @@ -114,7 +114,10 @@ def release_notes(self, config:release_notes) -> None: #If a branch name is supplied, compare against develop if config.latest_branch not in repo.branches: raise ValueError(f"latest branch {config.latest_branch} does not exist in the repository. Make sure your branch name is correct") - compare_against = "develop" + if config.compare_against not in repo.branches: + compare_against = config.compare_against + else: + compare_against = "develop" commit1 = repo.commit(config.latest_branch) commit2 = repo.commit(compare_against) diff_index = commit2.diff(commit1) diff --git a/contentctl/objects/config.py b/contentctl/objects/config.py index f287d010..23456e12 100644 --- a/contentctl/objects/config.py +++ b/contentctl/objects/config.py @@ -966,6 +966,7 @@ class release_notes(Config_Base): new_tag:Optional[str] = Field(None, description="Name of the tag containing new content. If it is not supplied," " then it will be inferred as the newest tag at runtime.") latest_branch:Optional[str] = Field(None, description="Branch for which we are generating release notes") + compare_against:Optional[str] = Field(None, description="Branch for which we are generating release notes against") def releaseNotesFilename(self, filename:str)->pathlib.Path: #Assume that notes are written to dist/. This does not respect build_dir since that is