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

Gitlab support #6

Open
nalkuatov opened this issue Jan 25, 2022 · 7 comments
Open

Gitlab support #6

nalkuatov opened this issue Jan 25, 2022 · 7 comments

Comments

@nalkuatov
Copy link

nalkuatov commented Jan 25, 2022

We're currently trying to enable the plugin for a project in Gitlab. The inline comments there seem to be rendered quite unexpectedly - there're some closing </tr> tags appearing as a plain text in a comment's resultant html.

Danger system's comment templates seem to be the same for both Gitlab and Github - do you have any ideas why the above happens? And does the plugin support Gitlab?

@tmspzz
Copy link
Owner

tmspzz commented Jan 26, 2022

Hey @nalkuatov, I'm not sure I do. The output is grabbed directly from hlint. Maybe there is some additional escaping needed?

@nalkuatov
Copy link
Author

nalkuatov commented Jan 29, 2022

Maybe there is some additional escaping needed?

I did try to remove the language syntax highlighting here - regular inline code highlighting works okay (using single backticks, e.g some code here), and as a result, now there're no random </tr> tags appearing in the inline comments.

This seems to be an issue at Danger's inline comments template for GitLab.

@nalkuatov
Copy link
Author

nalkuatov commented Jan 29, 2022

I haven't used Ruby before, so I don't have any other ideas for resolving this.

@nalkuatov
Copy link
Author

The only solution I can think of is to remove the syntax highlighting here again

@tmspzz
Copy link
Owner

tmspzz commented Jan 29, 2022

The only solution I can think of is to remove the syntax highlighting here again

You can try multiline Strings and remove the \n

@nalkuatov
Copy link
Author

nalkuatov commented Jan 29, 2022

message = <<~HEREDOC
      Found #{r['hint']}

      ```haskell
        #{r['from']}
      ```

      #{prompt}

      ```haskell
        #{r['to']}
      ```
    HEREDOC

Unfortunately, this doesn't help. Some random </tr>s are still there

@tmspzz
Copy link
Owner

tmspzz commented Jan 29, 2022

I guess then there's nothing much to do here. This must be fixed upstream in Danger.

Alternatively you can try to parse the output of Danger and remove the ?

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

2 participants