Skip to content

Commit 2c02e22

Browse files
committed
Skip draft releases in set_matching_formal_release
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.
1 parent bac2f51 commit 2c02e22

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/lastversion/repo_holders/github.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,18 @@ def get_latest(self, pre_ok=False, major=None):
660660
def set_matching_formal_release(
661661
self, ret, formal_release, version, pre_ok, data_type="release"
662662
):
663-
"""Set the current release selection to this formal release if matching conditions."""
663+
"""Set the current release selection to this formal release if matching conditions.
664+
665+
Args:
666+
ret:
667+
formal_release:
668+
version:
669+
pre_ok:
670+
data_type:
671+
"""
672+
if formal_release.get("draft"):
673+
log.info("Skipping this release due to draft status.")
674+
return ret
664675
if not pre_ok and formal_release["prerelease"]:
665676
log.info(
666677
"Found formal release for this tag which is unwanted "

0 commit comments

Comments
 (0)