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

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

Open
michaeldrotar opened this issue Mar 13, 2023 · 3 comments
Open
Labels
bug Something isn't working 👀.

Comments

@michaeldrotar
Copy link

michaeldrotar commented Mar 13, 2023

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

@michaeldrotar michaeldrotar added the bug Something isn't working label Mar 13, 2023
@michaeldrotar michaeldrotar changed the title Extra backtick causing format issues in dry run output add-comment@v1 backticks causing format issues in dry run output Mar 13, 2023
@vim-zz
Copy link
Collaborator

vim-zz commented Apr 2, 2023

@michaeldrotar can you re-check this?

@deiga
Copy link

deiga commented Apr 20, 2023

@vim-zz We're seeing similar behaviour!
Screenshot 2023-04-20 at 12 36 55

@BenLloydPearson
Copy link
Collaborator

I have an update to share on this. Our roadmap contains plans to rework gitStream testing capabilities over the next couple of months, and this will be either fixed or reworked as part of that initiative. Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀.
Projects
None yet
Development

No branches or pull requests

5 participants