changelog-ci icon indicating copy to clipboard operation
changelog-ci copied to clipboard

Step output unusable

Open tomer-ds opened this issue 2 years ago • 2 comments

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/[email protected]
        with:
          versionSpec: "5.11.1"

      - name: Determine Version
        id: gitversion
        uses: gittools/actions/gitversion/[email protected]

      - name: Run Changelog CI
        id: changelog-ci
        uses: saadmk11/[email protected]
        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 avatar Mar 02 '23 12:03 tomer-ds

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

This https://github.com/saadmk11/changelog-ci/blob/581236c0639b9dccc27c813b4ea87ea8b808642b/scripts/main.py#L220

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

tomer-ds avatar Mar 06 '23 07:03 tomer-ds

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

saadmk11 avatar Mar 06 '23 07:03 saadmk11