projmgr icon indicating copy to clipboard operation
projmgr copied to clipboard

Wrapper for GitLab as well?

Open lwjohnst86 opened this issue 4 years ago • 3 comments

Hi! Love the package, really well done :smile:

I use both GitLab and GitHub probably about equally. There are lots of R packages to interact with GitHub, but not so much with GitLab. Given most of the functionality of projmgr is "neutral-language", it would theoretically be possible to connect to GitLab as well without changing projmgr's API.

Would that be something you'd consider adding (if a PR was submitted that is :wink:)? I'm planning on making some type of functionality or package like this in the near future (or contributing to the gitlabr package, which seems to not be actively maintained or developed). So if its something you'd be interested in adding, I'd be happy to help contribute to projmgr with this.

lwjohnst86 avatar Apr 05 '20 13:04 lwjohnst86

Hi @lwjohnst86 - thanks so much for checking out the package and for the issue!

I love the idea of expanding projmgr to include multiple backends. I've never personally used GitLab, but I know its a popular choice, so I'd be delighted to collaborate with someone with experience there. I know @jwinget looked into this a bit last year and found some pretty fundamental differences in the API, but perhaps he can chime in and share any thoughts that could help point us in a better direction.

The first step might be to see how well the "concepts" map between GitHub and GitLab and what's available in different API calls. (It sounds like you have a big head start here). Depending on how similar or different they are, I think there are a few different ways we could think about implementing to make sure the correct get / parse functions are used while staying neutral to users.

Thanks again so much for the offer -- I'm very excited to see where this goes! :smile:

emilyriederer avatar Apr 08 '20 02:04 emilyriederer

Like Emily says, I did look at this a fair bit last year and found myself effectively re-writing major pieces of the package due to the API differences. Then my organization moved from GitLab to GitHub and my motivation lapsed ;)

If you're interested, my work is at https://github.com/jwinget/projmgr/tree/gitlab-support You can see in https://github.com/jwinget/projmgr/blob/gitlab-support/R/api-engine.R that I was doing a lot of things like: if(!grepl('gitlab', ref$base_url)){} else {}, which didn't feel like a very elegant solution.

jwinget avatar Apr 08 '20 12:04 jwinget

Thanks @emilyriederer and @jwinget, sounds great! Sorry for the late reply to this... corona lockdown has been difficult..

I'll play around with this over the next several months and see how it goes! :)

lwjohnst86 avatar May 25 '20 09:05 lwjohnst86