diff --git a/bundles/sshmon/files/check_forgejo_for_new_release b/bundles/sshmon/files/check_forgejo_for_new_release index 3db5bcd..99dcd30 100644 --- a/bundles/sshmon/files/check_forgejo_for_new_release +++ b/bundles/sshmon/files/check_forgejo_for_new_release @@ -38,10 +38,10 @@ try: for i in releases: if i["tag_name"].startswith(tag_prefix): - if ( + if not (i["prerelease"] or i["draft"]) and ( newest_release is None or parse(i["tag_name"]) > parse(newest_release["tag_name"]) - ) and not (i["prerelease"] or i["draft"]): + ): newest_release = i assert newest_release is not None, "Could not determine latest release" diff --git a/bundles/sshmon/files/check_github_for_new_release b/bundles/sshmon/files/check_github_for_new_release index 3a50d94..ec510de 100644 --- a/bundles/sshmon/files/check_github_for_new_release +++ b/bundles/sshmon/files/check_github_for_new_release @@ -37,10 +37,10 @@ try: for i in releases: if i["tag_name"].startswith(tag_prefix): - if ( + if not (i["prerelease"] or i["draft"]) and ( newest_release is None or parse(i["tag_name"]) > parse(newest_release["tag_name"]) - ) and not (i["prerelease"] or i["draft"]): + ): newest_release = i assert newest_release is not None, "Could not determine latest release"