GitLabProjects
GitLabProjects copied to clipboard
As a user , I should be able to add comments on files with line number on merge requests
Hi sorry for very late reaction. How exactly this should work? I am using JetBrains builtin UI for displaying merge requests so I cannot easily add comment button to the compare screen. This would have to be separate dialog outside the compare screen and it does not seem that useful for me. Also I do not know if this even is possible with GitLab API. https://docs.gitlab.com/ee/api/notes.html#merge-requests
Hello,
I replying as I would be really interested in this feature.
Yes indeed Gitlab interface use this API endpoint to add a comment:https://docs.gitlab.com/ee/api/notes.html#create-new-merge-request-note
What is not detailed in the documentation is the payload associated sent the the content-type: application/x-www-form-urlencoded;
- utf8:✓
- authenticity_token: <token_value>
- target_type:
- target_id:
- note[commit_id]:
- note[line_code]:d86b394f807ac38f6575e60a2eb59c73a5c6fdc6_0_80
- note[noteable_id]:6566
- note[noteable_type]:MergeRequest
- note[note]:Comment body
- commit:Add Comment
For the line_code, I can't find what the first part is refering to exactly. The 0 is a static valude and the 80 is the line number.
Do you think this will ever be added? It would be really nice to provide merge request comments without going to gitlab.
I still do not understand to where I should put this. The compare dialog (the part where you see the actual code) is dialog from IDE and I cannot change it.
I can change stuff on these dialogs. So you can add comments but not really sure how to add line numbers to this interface.
And from looking into comment documentation I still do not understand how to do this either.
@LucasHantz I cannot find nothing about this in documentation, I am not implementing anything based on non documented API, that usually means that this functionality is not intended to be used ... the first part is probably a commit sha, I do not event have this when working with rest of the merge request I am leaving the actual diff to intelli j.
I would like to be able to right click in the compare dialog, and in the pop menu have an option "Add comment" that would add the merge comment (note) on gitlab. The not does not need to be visible in the compare dialog, though it would be nice to have some indication that a note was added for that line.
Right now there is no easy option to add action to that popup menu based on condition (condtion being that this dialog is open on gitlab merge request) I can add action globally for every diff window inside IDE, that does not seem that great.
There are some options for conditional context action in diff dialogs, but not in the git diff window, I would need to use different dialog, but those are not equipped to do a git branch diffs out of box so it would be a lot of work (weeks) for doing this.
Also possibility of doing visual indicators is close to none.
This with combination that this is not really a supported function of gitlab api I would need to use some undocumented API calls where I am not sure what half of the parameters do I am not seeing this as likely that this will get implemented.
Ok, thanks for the update.
@PavlikPolivka gerrit plugin for IntelliJ supports that to some extent, so maybe an option would be to copy the code from here: https://github.com/uwolfer/gerrit-intellij-plugin
I will look into that. Thanks.
On Tue, May 8, 2018, 07:55 cinash [email protected] wrote:
@PavlikPolivka https://github.com/PavlikPolivka gerrit plugin for IntelliJ supports that to some extent, so maybe an option would be to copy the code from here: https://github.com/uwolfer/gerrit-intellij-plugin
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/PavlikPolivka/GitLabProjects/issues/46#issuecomment-387293161, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJtrhYx3nTF2hgvYj0mR7KRvihkotuMks5twTNqgaJpZM4Kz1Wx .
Looking at the code, it looks like the Gerrit plugin may provide its own diff UI instead of using the Intellij default.
@PavlikPolivka, Any chances get this feature worked?
For me this is the lowest priority on my TODO.
It's lots of work for something that I will never use, my reason for developing this plugin is to provide workflow we use at my company, we dont really use this so it would be nice to have I do not have time to add this.
I would love to merge if anyone would contribute.
Pavel
On Wed, Aug 7, 2019 at 11:05 AM Roman Kitaev [email protected] wrote:
@PavlikPolivka https://github.com/PavlikPolivka, Any chances get this feature worked?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PavlikPolivka/GitLabProjects/issues/46?email_source=notifications&email_token=ABZG3LSGW524VYJGVILRKXTQDKF6VA5CNFSM4CWPKWY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3XXVJY#issuecomment-519010983, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZG3LXH56TMUB3C7G44NV3QDKF6VANCNFSM4CWPKWYQ .
-- Polívka Pavel