Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write adapter for GitLab and other systems #281

Open
jywarren opened this issue Oct 18, 2019 · 5 comments
Open

Write adapter for GitLab and other systems #281

jywarren opened this issue Oct 18, 2019 · 5 comments

Comments

@jywarren
Copy link
Member

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
Copy link
Member Author

jywarren commented Oct 18, 2019

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

function getCommitsInRange(username, repo, options){
url = "https://api.github.com/repos/"+username+"/"+repo+"/commits?since=" + options["since"]["date"]+ "T" + options["since"]["time"] + "Z"+"&until="+options["until"]["date"]+"T"+ options["until"]["time"] + "Z";
result = httpGet(url);
return JSON.parse(result);
}

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
Copy link
Collaborator

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?

@jywarren jywarren unpinned this issue Mar 30, 2021
@unnati914
Copy link

is this issue still needs help?

@jywarren
Copy link
Member Author

jywarren commented Jul 3, 2021 via email

@unnati914
Copy link

sure will look into it
Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants