Skip to content

Commit

Permalink
fix(release_notes): ensure tag prefix is included
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Aug 1, 2024
1 parent 874be46 commit 6bbfb0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions action/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,18 @@ def main() -> dict:
release_tag = f"{release_version}"

# generate release notes
version_prefix = os.getenv('INPUT_TAG_PREFIX', 'v')
if push_event_details['publish_release']:
release_body = generate_release_body(
tag_name=release_tag,
tag_name=f"{version_prefix}{release_tag}",
target_commitish=push_event_details["release_commit"],
)
else:
release_body = ''
release_generate_release_notes = True if not release_body else False

version_prefix = ''
if os.getenv('INPUT_INCLUDE_TAG_PREFIX_IN_OUTPUT', 'true').lower() == 'true':
version_prefix = os.getenv('INPUT_TAG_PREFIX', 'v')
if os.getenv('INPUT_INCLUDE_TAG_PREFIX_IN_OUTPUT', 'true').lower() != 'true':
version_prefix = ''

Check warning on line 435 in action/main.py

View check run for this annotation

Codecov / codecov/patch

action/main.py#L435

Added line #L435 was not covered by tests

job_outputs['publish_release'] = str(push_event_details['publish_release']).lower()
job_outputs['release_body'] = release_body
Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected_release_notes_sample_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
* [@cathyjf](https://github.com/cathyjf) made their first contribution in [#2786](https://github.com/LizardByte/Sunshine/pull/2786)
* [@cfalas](https://github.com/cfalas) made their first contribution in [#2841](https://github.com/LizardByte/Sunshine/pull/2841)

**Full Changelog**: https://github.com/LizardByte/Sunshine/compare/v0.23.1...2024.713.195308
**Full Changelog**: https://github.com/LizardByte/Sunshine/compare/v0.23.1...v2024.713.195308


---
Expand Down
2 changes: 1 addition & 1 deletion tests/data/provided_release_notes_sample_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@
* @cathyjf made their first contribution in https://github.com/LizardByte/Sunshine/pull/2786
* @cfalas made their first contribution in https://github.com/LizardByte/Sunshine/pull/2841

**Full Changelog**: https://github.com/LizardByte/Sunshine/compare/v0.23.1...2024.713.195308
**Full Changelog**: https://github.com/LizardByte/Sunshine/compare/v0.23.1...v2024.713.195308

0 comments on commit 6bbfb0a

Please sign in to comment.