Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gh-actions-output): fixed trailing newline to match GITHUB_OUTPUT format #885

Merged

Conversation

codejedi365
Copy link
Contributor

@codejedi365 codejedi365 commented Apr 6, 2024

Purpose

Resolve #884 bug of a missing trailing newline which is expected by GitHub Actions

Rationale

The bug existed because str.join() only inserts a value between elements which means the last element did not receive a newline.

How I tested

Refactored the existing tests to more visually define the exact output value that should be placed in the output file. The tests now properly detect when the newline is missing.

How to verify

git fetch origin pull/885/head:pr-885

# checkout the PR as a detached HEAD state with only the unit tests
git checkout pr-885~1 --detach

# execute unit-tests 
pytest tests/unit/semantic_release/cli/test_github_actions_output.py

# update to the HEAD of the PR (with fixes)
git merge --ff-only pr-885

# run pytest again to see success
pytest tests/unit/semantic_release/cli/test_github_actions_output.py

# run full suite for verification
pytest

@codejedi365 codejedi365 self-assigned this Apr 6, 2024
@codejedi365 codejedi365 merged commit 2c7b6ec into python-semantic-release:master Apr 6, 2024
7 checks passed
@codejedi365 codejedi365 deleted the fix/gh-actions-output branch April 6, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing end-of-line character when writing to $GITHUB_OUTPUT
1 participant