Skip to content

Commit

Permalink
Make "since" argument optional
Browse files Browse the repository at this point in the history
If not specified the latest delivery release date will be used
fixes #68
  • Loading branch information
atarutin committed May 8, 2024
1 parent b994d1e commit 97e6556
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ def choose_component_from_release(rel: NovaRelease) -> Optional[NovaComponent]:
packages = release_repository.get_packages(
config.data["jira"]["project"]
)

if args.since:
print("Since date is specified as an argument.")
since = args.since
else:
print(
f"Since date is not specified, using latest released version date."
)
print(f"If you want to specify since date, use --since argument.")
latest_version = ji.get_latest_released_version(
config.data["jira"]["project"]
)
print(f"Latest released version detected: {latest_version.name}.")
since = latest_version.releaseDate
print(f"'Since' date to be used: {since}")

gi = GitIntegration()
all_tags_info: list[dict[str, str]] = []
counter = 0
Expand All @@ -173,7 +189,7 @@ def choose_component_from_release(rel: NovaRelease) -> Optional[NovaComponent]:
if package.repo is None:
continue

repo_all_tags = gi.list_tags(package.repo.url, args.since)
repo_all_tags = gi.list_tags(package.repo.url, since)

# filter out tags which are not related to packages, common rules
package_tags = list(
Expand Down

0 comments on commit 97e6556

Please sign in to comment.