danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.22k stars 363 forks source link

[BUG] `message` does not attach to a file and line provided, and instead all comments are in the "main comment" section #1419

Open kadoshms opened 7 months ago

kadoshms commented 7 months ago

Describe the bug

Seems like using the message API with a file and line doesn't always add the message as a comment on the file. I would expect that for instance passing a foo.ts with line 6, would add the comment as follows:

image

Instead, the message is created under the "main comment" only - with the following format:

image

{FILE_PATH}:L{LINE_NUMBER} - message

To Reproduce Steps to reproduce the behavior:

  1. Create a danger rule with message on a file and line
  2. Create an MR on GitLab Self-Hosted

Expected behavior If provided, message should be inline to the file and line as a comment.

Screenshots See above

Your Environment GitLab Self-Hosted D

software version
danger.js 11.3.1
node 16.20.1
fbartho commented 3 months ago

It’s likely the issue is in one of the following files

Possibly in optional APIs that you need to override, or in how they’re submitting messages to the GitLab APIs

I don’t use GitLab, but somebody who does can probably figure it out from there! — (Does GitLab support line-level comments via API?)