Skip to content

Respect newlines in text inputΒ #26

@vsayer

Description

@vsayer

At the current moment, it doesn't appear newlines are being respected when sending the alert to teams. We're preparing a changelog which is then being passed into the text input. If the changelog is multiline, text: parses it as single-line, i.e.,

Here's what I see:

A new version was just published: v1.4.1 πŸš€
Changelog: \n### Blah\n\n- blah: blah\n- blah: blah\n\n### Fixes\n ... \n

Tried escaping newlines in a previous step but no luck either.

notification_changelog="$(echo "$changelog" | sed -z 's/\n/\\n/g')"

Here's how I'm using the action:

      - name: Announce release on msteams
        uses: aliencube/[email protected]
        with:
          webhook_uri: ${{ secrets.MSTEAMS_WEBHOOK_RELEASES_URL }}
          title: 'A new version was just published: ${{ steps.tag_version.outputs.new_tag }}
            πŸš€'
          summary: 'A new version was just published: ${{ steps.tag_version.outputs.new_tag }}
            πŸš€'
          text: |
            Changelog:
              ${{ steps.prepare_notification_changelog.outputs.notification_changelog }}

Any help appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions