Skip to content

Commit

Permalink
Change default empty output to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
philnewm committed Sep 12, 2024
1 parent ad1599f commit 2ee249b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions github_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_version_increment(patch_bump_list: list, minor_bump_list: list, pr_label
"""

if not pr_label_list:
return
return ""

# TODO add major bump option
if any(label in pr_label_list for label in minor_bump_list):
Expand All @@ -152,4 +152,4 @@ def get_version_increment(patch_bump_list: list, minor_bump_list: list, pr_label
if any(label in pr_label_list for label in patch_bump_list):
return "patch"

return
return ""
6 changes: 3 additions & 3 deletions tests/test_github_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def test_get_version_increment_minor(minor_bump, patch_bump, pr_labels_enhanceme
def test_get_version_increment_wrong_labels(minor_bump, patch_bump, pr_labels_wrong_labels):
increment = github_query.get_version_increment(patch_bump_list=patch_bump, minor_bump_list=minor_bump, pr_label_list=pr_labels_wrong_labels)

assert increment == None
assert increment == ""

def test_get_version_increment_none(minor_bump, patch_bump, pr_labels_none):
increment = github_query.get_version_increment(patch_bump_list=patch_bump, minor_bump_list=minor_bump, pr_label_list=pr_labels_none)

assert increment == None
assert increment == ""

def test_get_version_increment_ampty_list(minor_bump, patch_bump, pr_labels_empty_list):
increment = github_query.get_version_increment(patch_bump_list=patch_bump, minor_bump_list=minor_bump, pr_label_list=pr_labels_empty_list)

assert increment == None
assert increment == ""

0 comments on commit 2ee249b

Please sign in to comment.