github-review icon indicating copy to clipboard operation
github-review copied to clipboard

Can this work with gitlab ?

Open yisraeldov opened this issue 6 years ago • 7 comments

It would be great to be able to use this with gitlab as well.

yisraeldov avatar Mar 17 '19 11:03 yisraeldov

We can work on expanding it, we would have to rename the package though. Is that work you are interested in doing @yisraeldov ? Are you comfortable sending PRs for this?

charignon avatar Mar 27 '19 07:03 charignon

Github doesn't send me mails about notifications so I missed this. I don't think I would have the skills or the time, but I'll happily send a merger request if I do.

yisraeldov avatar Mar 31 '19 04:03 yisraeldov

If someone wants to tackle this, you probably want to do: 1) Create and test support for the following gitlab APIs

  • Get MR -> get the comments and summary
  • Get MR diff versions -> get the latest version id
  • Get MR diff version -> get the diff content
  • Approve Merge Request
  • Unapprove Merge Request
  • List all merge request notes
  • Create new merge request note

2) Abstract away the business logic so that github and gitlab can follow the same flow (should be very little work)

3) Integrate 1 and 2 to add support for gitlab

charignon avatar Jan 10 '20 05:01 charignon

@yisraeldov I am going to take that on in the coming weeks and will update this issue accordingly.

charignon avatar Feb 16 '20 18:02 charignon

I just looked into it. It seems that everything is straightforward to implement with two caveats:

  1. submitting a comment (called notes in Gitlab's verbiage) on a specific line of a diff requires using the graphql API, the rest endpoint only seems to support top level comment
  2. diffs are returned by the API in pieces and we would have to rebuild a full diff from what we get from the API.

2 can be solved in less than an hour, but 1 requires a new dependency and significant change. Is github-review support for gitlab worth it without inline comments for a v1? @yisraeldov what do you think?

charignon avatar Mar 04 '20 08:03 charignon

@charignon Sorry for not replying.

For me personal, it would be a cool thing to have but I'm not actively going to be using it at the moment.

yisraeldov avatar Jul 09 '20 00:07 yisraeldov

Hi there! I am interested in adding support for Phabricator. I was wondering if the code to add Gitlab support was pushed somewhere, so that I could use it as a base. Thanks!

jakejx avatar Feb 17 '21 12:02 jakejx