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

Step output unusable #94

Open
tomer-ds opened this issue Mar 2, 2023 · 2 comments
Open

Step output unusable #94

tomer-ds opened this issue Mar 2, 2023 · 2 comments

Comments

@tomer-ds
Copy link

tomer-ds commented Mar 2, 2023

Describe the bug

The output of the step cannot be used as it misses compatible line breaks

Your Environment

Contents of Your Changelog-CI Workflow File (.yaml File):

name: Changelog CI

on:
  push:
    branches:
      - hotfix/*
      - release/*
    paths-ignore:
      - "*.md"

jobs:
  generate_changelog:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Install GitVersion
        uses: gittools/actions/gitversion/setup@v0.9.15
        with:
          versionSpec: "5.11.1"

      - name: Determine Version
        id: gitversion
        uses: gittools/actions/gitversion/execute@v0.9.15

      - name: Run Changelog CI
        id: changelog-ci
        uses: saadmk11/changelog-ci@v1.1.1
        with:
          config_file: changelog-config.yaml
          release_version: ${{ steps.gitversion.outputs.majorMinorPatch }}
          github_token: ${{ secrets.ACTIONS_AUTH_TOKEN }}

      - name: Get Changelog Output
        run: |
          echo "${{ steps.changelog-ci.outputs.changelog }}"
          echo "${{ steps.changelog-ci.outputs.changelog }}" >> $GITHUB_STEP_SUMMARY

Contents of Changelog-CI Configuration File (If Applicable):

changelog_type: "pull_request"
header_prefix: "Version:"
commit_changelog: true
comment_changelog: false
include_unlabeled_changes: true
unlabeled_group_title: "Changes"
pull_request_title_regex: ".*"
version_regex: ".*"
group_config:
  - title: Bug Fixes
    labels:
      - bug
      - bugfix
  - title: Code Improvements
    labels:
      - improvements
      - enhancement
  - title: New Features
    labels:
      - feature
  - title: Updates
    labels:
      - update
  - title: Dependencies
    labels:
      - dependencies
  - title: Documentation Updates
    labels:
      - docs
      - documentation
      - doc

Expected behavior

The output will appear in the summary as intended

Actual behavior

The output appears in the summary without line breaks leading to an ALL header output instead of the readable changelog output found in the file

Additional context

Add any other context about the problem here.

image

@tomer-ds
Copy link
Author

tomer-ds commented Mar 6, 2023

I think I might have found something, but I can't be 100% sure at this point...

This

gha_utils.set_output("changelog", changelog_string)

Calls this
https://github.com/saadmk11/github-action-utils/blob/90a1f98c60bb2278ab3b37916889df57eb5d2969/github_action_utils.py#L140

Which has a misplaced call to .encode() method

Opened issue

@saadmk11
Copy link
Owner

saadmk11 commented Mar 6, 2023

Thank you for reporting the issue. I will look into it this weekend. :)

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

No branches or pull requests

2 participants