Fix a bug in the manual tag
This commit is contained in:
parent
e082ff5c3b
commit
64d2fffec2
@ -42,8 +42,7 @@ def get_previous_tag_in_series(tag):
|
||||
manual_tag = '.'.join(version_array)
|
||||
if manual_tag in filtered_tags:
|
||||
current_index = filtered_tags.index(manual_tag)
|
||||
if current_index + 1 < len(filtered_tags):
|
||||
return filtered_tags[current_index + 1]
|
||||
return filtered_tags[current_index]
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
@ -52,7 +51,7 @@ def get_previous_tag_in_series(tag):
|
||||
def get_changelog(current_commit, previous_tag):
|
||||
""" Get the changelog between the current commit and the previous tag. """
|
||||
try:
|
||||
if previous_tag:
|
||||
if previous_tag is not None:
|
||||
changelog = run_git_command(['git', 'log', f'{previous_tag}..{current_commit}', '--oneline'])
|
||||
else:
|
||||
# No previous tag, so get the log from the start of the repository
|
||||
@ -83,7 +82,7 @@ if not commit:
|
||||
|
||||
previous_tag = get_previous_tag_in_series(tag)
|
||||
changelog = get_changelog(commit, previous_tag)
|
||||
|
||||
|
||||
headers = {
|
||||
'Authorization': f'Bearer {oauth2_token}',
|
||||
'Accept': 'application/json'
|
||||
|
Loading…
Reference in New Issue
Block a user