publiclab / community-toolbox

Tools to understand and welcome people into a contributor community
https://code.publiclab.org
MIT License
142 stars 197 forks source link

Write adapter for GitLab and other systems #281

Open jywarren opened 4 years ago

jywarren commented 4 years ago

Now that @Rishabh570 has done so much to modularize and organize the code for this system, we should consider how to approach GitLab compatibility! 🎉

I'm at GSoC mentor summit now and people are asking!

This sounds like a big project, but we should be able to isolate where the API requests are made, and write equivalents for GitLab. This will take some brainstorming, and some collecting of code links to get started!

jywarren commented 4 years ago

Here's one obvious place where we point at GitHub:

https://github.com/publiclab/community-toolbox/blob/03687364d1d0a1c958b9cff9421704326b49b865/src/utils/getRepoContributors.js#L32-L36

Maybe we could have it detect from the configuration JSON file, which provider it is, based on the URLs listed?

https://github.com/publiclab/community-toolbox/blob/64175423803a8a9a82945a5f4e656cce1d41ae21/examples/issues.json

There aren't too many places where api.github.com is hard-coded:

https://github.com/publiclab/community-toolbox/search?utf8=%E2%9C%93&q=api.github.com&type=

We also need to do some research on GitLab's public APIs and rate limits to find good matches and see if anything more complex would be required.

https://docs.gitlab.com/ee/api/

Rishabh570 commented 4 years ago

Hi @jywarren, I was wondering how we can go about adding GitLab support. One thing I noticed is, GitLab's API response objects are different than what GitHub offers and also we're currently using github-api-simple which is just for GitHub...we can reuse the request destination easily with a config but how we're going to handle different kinds of response objects that GitHub and GitLab send. Seems like we'd have to come up with a way to plug different response handlers according to the platform.

What do you think about this?

unnati914 commented 3 years ago

is this issue still needs help?

jywarren commented 3 years ago

Hi, Unnati, I think this one may be quite a big project. Would you be at all interested in helping on this set of projects? https://github.com/publiclab/spectral-workbench/issues/673

On Fri, Jul 2, 2021 at 1:27 AM Unnati @.***> wrote:

is this issue still needs help?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/community-toolbox/issues/281#issuecomment-872726441, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J7ERDDWYBQIR4HFKC3TVVE5PANCNFSM4JCIBHLQ .

unnati914 commented 3 years ago

sure will look into it Thank you :)