Skip to content

add-comment@v1 backticks causing format issues in dry run output #46

Open
@michaeldrotar

Description

@michaeldrotar

Describe the bug

There's an extra backtick here:
image
which misformats here
image
it should render like this

  • to add the following reviewers johnlock

To Reproduce

Steps to reproduce the behavior:

  • I'm using this automation
  assign_previous_contributors:
    if:
      - {{ not pr.draft }}
    run:
      - action: add-comment@v1
        args:
          comment: |
            {{ repo | explainRankByGitBlame(gt=25) | dump | safe }}
      - action: add-reviewers@v1
        args:
          reviewers: {{ repo | rankByGitBlame(gt=25) }}
  • and then running it in dry mode

Expected behavior

it should output without the extra backtick so it renders like this

  • to add the following reviewers johnlock

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Afer looking more closely, this happens anytime using add-comment@v1 cause it seems to assume a short single-line comment like

  • add comment foo bar baz

but if you do a multi-line comment, like the explainRankByGitBlame dump, then you get a leading backtick as well before the comment and that tailing one causing mis-formatting

can see the leading one here:

image

it would probably be better to have add-comment@v1 start the comment on the next line and not add any of its own formatting in dry run

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working👀.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions