Skip to content

Commit message in {{commit.message}} contains "\n\n" #61

Open

Description

@Imjamper

Subject. How I can remove "\n\n" characters ? Thank you.

Activity

  1. appleboy commented on Apr 6, 2018

    @appleboy
    Owner

    @thejackgatsby Why need to remove \n\n characters?

  2. Imjamper commented on Apr 6, 2018

    @Imjamper
    Author

    Example:

    {{#success build.status}}
            <a href="{{build.link}}">[#{{build.number}}] The build was successfull. All services were deployed.</a>
            <pre>Branch: {{commit.Branch}}</pre>
            <pre>Message: {{commit.Message}}</pre>
            <pre>SHA: ${DRONE_COMMIT_SHA:0:8}</pre>
            <pre>Author: {{commit.Author}}</pre>
            <pre>Elapsed: {{buildtime build.started}}</pre>
          {{else}}
            <a href="{{build.link}}">[#{{build.number}}] Build failed.</a>
            <pre>Branch: {{commit.Branch}}</pre>
            <pre>Message: {{commit.Message}}</pre>
            <pre>SHA: ${DRONE_COMMIT_SHA:0:8}</pre>
            <pre>Author: {{commit.Author}}</pre>
            <pre>Elapsed: {{buildtime build.started}}</pre>
          {{/success}}
    

    And in telegram I have:
    error

    Updated:
    I noticed this only now, the newline character also occurs in other properties. Maybe I did something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址