Skip to content

Commit

Permalink
Merge branch 'main' into test_on_app_change
Browse files Browse the repository at this point in the history
  • Loading branch information
ljstella authored Oct 28, 2024
2 parents 23f3742 + 35d8b82 commit 825d854
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions contentctl/actions/release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ 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:
raise ValueError(f"compare_against branch {config.compare_against} does not exist in the repository. Make sure your branch name is correct")

commit1 = repo.commit(config.latest_branch)
commit2 = repo.commit(compare_against)
commit2 = repo.commit(config.compare_against)
diff_index = commit2.diff(commit1)

modified_files:List[pathlib.Path] = []
Expand Down Expand Up @@ -189,7 +191,7 @@ def release_notes(self, config:release_notes) -> None:

if config.latest_branch:
print(f"Generating release notes - \033[92m{config.latest_branch}\033[0m")
print(f"Compared against - \033[92m{compare_against}\033[0m")
print(f"Compared against - \033[92m{config.compare_against}\033[0m")
print("\n## Release notes for ESCU " + config.latest_branch)

notes = [self.create_notes(config.path, stories_added, header="New Analytic Story"),
Expand Down
5 changes: 3 additions & 2 deletions contentctl/objects/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,9 @@ class release_notes(Config_Base):
"second newest tag at runtime.")
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")

latest_branch:Optional[str] = Field(None, description="Branch name for which we are generating release notes for")
compare_against:Optional[str] = Field(default="develop", description="Branch name for which we are comparing the files changes against")

def releaseNotesFilename(self, filename:str)->pathlib.Path:
#Assume that notes are written to dist/. This does not respect build_dir since that is
#only a member of build
Expand Down
2 changes: 1 addition & 1 deletion contentctl/objects/correlation_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def splunk_path(self) -> str:
:returns: the search path
:rtype: str
"""
return f"/saved/searches/{self.name}"
return f"saved/searches/{self.name}"

@computed_field
@cached_property
Expand Down
1 change: 0 additions & 1 deletion contentctl/objects/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ class SecurityDomain(str, enum.Enum):
IDENTITY = "identity"
ACCESS = "access"
AUDIT = "audit"
CLOUD = "cloud"

class AssetType(str, enum.Enum):
AWS_ACCOUNT = "AWS Account"
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.poetry]
name = "contentctl"
version = "4.4.0"
version = "4.4.1"

description = "Splunk Content Control Tool"
authors = ["STRT <[email protected]>"]
license = "Apache 2.0"
Expand Down

0 comments on commit 825d854

Please sign in to comment.