Skip to content

Commit dd77dc6

Browse files
authored
Merge branch 'main' into enable_acs_deploy
2 parents 9c2bdff + 7f5319e commit dd77dc6

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

contentctl/actions/release_notes.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ def release_notes(self, config:release_notes) -> None:
114114
#If a branch name is supplied, compare against develop
115115
if config.latest_branch not in repo.branches:
116116
raise ValueError(f"latest branch {config.latest_branch} does not exist in the repository. Make sure your branch name is correct")
117-
compare_against = "develop"
117+
if config.compare_against not in repo.branches:
118+
raise ValueError(f"compare_against branch {config.compare_against} does not exist in the repository. Make sure your branch name is correct")
119+
118120
commit1 = repo.commit(config.latest_branch)
119-
commit2 = repo.commit(compare_against)
121+
commit2 = repo.commit(config.compare_against)
120122
diff_index = commit2.diff(commit1)
121123

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

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

195197
notes = [self.create_notes(config.path, stories_added, header="New Analytic Story"),

contentctl/objects/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,9 @@ class release_notes(Config_Base):
966966
"second newest tag at runtime.")
967967
new_tag:Optional[str] = Field(None, description="Name of the tag containing new content. If it is not supplied,"
968968
" then it will be inferred as the newest tag at runtime.")
969-
latest_branch:Optional[str] = Field(None, description="Branch for which we are generating release notes")
970-
969+
latest_branch:Optional[str] = Field(None, description="Branch name for which we are generating release notes for")
970+
compare_against:Optional[str] = Field(default="develop", description="Branch name for which we are comparing the files changes against")
971+
971972
def releaseNotesFilename(self, filename:str)->pathlib.Path:
972973
#Assume that notes are written to dist/. This does not respect build_dir since that is
973974
#only a member of build

contentctl/objects/correlation_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def splunk_path(self) -> str:
264264
:returns: the search path
265265
:rtype: str
266266
"""
267-
return f"/saved/searches/{self.name}"
267+
return f"saved/searches/{self.name}"
268268

269269
@computed_field
270270
@cached_property

contentctl/objects/enums.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ class SecurityDomain(str, enum.Enum):
330330
IDENTITY = "identity"
331331
ACCESS = "access"
332332
AUDIT = "audit"
333-
CLOUD = "cloud"
334333

335334
class AssetType(str, enum.Enum):
336335
AWS_ACCOUNT = "AWS Account"

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[tool.poetry]
22
name = "contentctl"
3-
version = "4.4.0"
3+
version = "4.4.3"
4+
45
description = "Splunk Content Control Tool"
56
authors = ["STRT <[email protected]>"]
67
license = "Apache 2.0"

0 commit comments

Comments
 (0)