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

Respect newlines in text input #26

Open
vsayer opened this issue Feb 14, 2024 · 0 comments
Open

Respect newlines in text input #26

vsayer opened this issue Feb 14, 2024 · 0 comments

Comments

@vsayer
Copy link

vsayer commented Feb 14, 2024

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/microsoft-teams-actions@v0.8.0
        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!

@vsayer vsayer changed the title Respect newlines in text field Respect newlines in text input Feb 14, 2024
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

1 participant