auto icon indicating copy to clipboard operation
auto copied to clipboard

Gitlab support

Open hipstersmoothie opened this issue 6 years ago • 14 comments

Is your feature request related to a problem? Please describe.

auto currently only works with GitHub.

Describe the solution you'd like

~A plugin for GItLab which is loaded automatically for gitlab URLS.~

I think this might make more sense to just build into auto.

hipstersmoothie avatar Jan 17 '19 20:01 hipstersmoothie

Hopefully when #184 is done it'll make this a little easier.

just-be-dev avatar Jan 19 '19 01:01 just-be-dev

Can I ask, what's the status on this? @zephraph 's previous comment was on a PR that was closed. Is something needed for this project? Is something missing from the GitLab API?

sc250024 avatar Dec 13 '19 18:12 sc250024

I dont see this being all that much work. We have this class https://github.com/intuit/auto/blob/master/packages/core/src/git.ts that handles setting up ocotkit and making calls to github. All we need to do is:

  • detect github/gitlab from repo url
  • call appropriate url

The hardest part of this might be the types. Octokit has very comprehensive types and we use them in a few places.

hipstersmoothie avatar Dec 15 '19 03:12 hipstersmoothie

Hi - any updates to this? Would really appreciate if this was Gitlab compatible

james-s-nduka avatar Mar 05 '20 08:03 james-s-nduka

It's a pretty large lift without an octokit for GitLab. To make this work we basically need to write that

hipstersmoothie avatar Mar 05 '20 20:03 hipstersmoothie

It's a pretty large lift without an octokit for GitLab. To make this work we basically need to write that

My time to shine hehe, I created a library called Gitbeaker to do just this!

jdalrymple avatar Apr 19 '20 15:04 jdalrymple

Might be smarter to split this part out into a plugin, thinking about supporting different hosting services in the future.

jdalrymple avatar Apr 19 '20 15:04 jdalrymple

Might be smarter to split this part out into a plugin

Exactly! In an ideal world Github stuff should become a plugin and GitLab will just implement a similar interface.

Getting the types to work nicely might be hard though. there are a few places where plugins an parts of auto access octokit directly too

hipstersmoothie avatar Apr 19 '20 19:04 hipstersmoothie

@jdalrymple your work looks super promising!

hipstersmoothie avatar Apr 19 '20 19:04 hipstersmoothie

I think the best way to approach this is to:

  1. get some of the lower hanging fruit out of the way (label, create-labels, pr-check, pr-status, pr-body, comment)
  2. While doing 1 craft the base of what GitHub being a plugin looks like so we can then tackle the deeper issues

I think I'll start with comment. Can you send me the appropriate APIs to create, edit and delete comments on PRs?

hipstersmoothie avatar Apr 19 '20 19:04 hipstersmoothie

I think the best way to approach this is to:

1. get some of the lower hanging fruit out of the way (label, create-labels, pr-check, pr-status, pr-body, comment)

2. While doing `1` craft the base of what GitHub being a plugin looks like  so we can then tackle the deeper issues

I think I'll start with comment. Can you send me the appropriate APIs to create, edit and delete comments on PRs?

Heres the Gitlab API docs And the corresponding gitbeaker support

Sorry for the raw source, I'm still working on getting docs up and running

jdalrymple avatar Apr 19 '20 22:04 jdalrymple

Any progress on this ? Thanks

lukasmrtvy avatar Mar 08 '21 21:03 lukasmrtvy

@lukasmrtvy I dont think the github support was ever moved out into a plugin format (I could be wrong!) but the support definitely exists in Gitbeaker to connect to gitlab.

jdalrymple avatar Mar 08 '21 21:03 jdalrymple

@jdalrymple it is a package, if someone can propose an interface for it and link to this issue we can work from there: https://github.com/intuit/auto/tree/main/plugins/git-tag

serafdev avatar Sep 19 '23 13:09 serafdev