Skip to content

Commit

Permalink
Skip draft releases in set_matching_formal_release
Browse files Browse the repository at this point in the history
Added a check to skip draft releases in the set_matching_formal_release method. This prevents draft releases from being incorrectly set as the current release. Updated the docstring to include argument descriptions.
  • Loading branch information
dvershinin committed Aug 26, 2024
1 parent bac2f51 commit 2c02e22
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/lastversion/repo_holders/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,18 @@ def get_latest(self, pre_ok=False, major=None):
def set_matching_formal_release(
self, ret, formal_release, version, pre_ok, data_type="release"
):
"""Set the current release selection to this formal release if matching conditions."""
"""Set the current release selection to this formal release if matching conditions.
Args:
ret:
formal_release:
version:
pre_ok:
data_type:
"""
if formal_release.get("draft"):
log.info("Skipping this release due to draft status.")
return ret
if not pre_ok and formal_release["prerelease"]:
log.info(
"Found formal release for this tag which is unwanted "
Expand Down

0 comments on commit 2c02e22

Please sign in to comment.