-
Notifications
You must be signed in to change notification settings - Fork 51
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
WIP: Support GitLab API #37
base: master
Are you sure you want to change the base?
Conversation
@stanhu I have some further feedback, I wrote it out this morning but somehow didn't post the comment. My initial reaction is that it's going to be really hard for me to parse through the noise of the namespace change with the new classes being added for gitlab. I propose that we split those commits out into a new PR and merge them into master once all the spec are passing again. Not exactly sure if that means we need to close this PR or |
@rauhryan I think that's a good idea. We should probably first decide whether these namespace changes are appropriate (e.g. |
Good question, we're going to noodle on it a little bit. We'll post a picture of our whiteboard soon. On Wed, Dec 2, 2015 at 11:59 AM, Stan Hu [email protected] wrote:
|
I think that, initially, The changes should almost be transparent, except for a small detail where the user This is of course the first stage of working on This is the second stage, and you will be working on both projects at the same time. After you make sure everything works, then you can make other changes and refactors (e.g: move |
Sooo, in an ideal world... huboard-web changes very little my vision would require two changes to huboard-web
In a perfect world, nothing would change other than config values in HuBoard, all the abstractions would live in Ghee |
👍 @stanhu thanks for working on this one. |
We had some discussions and we think the best way to break it down is by having a common interface that the outside world interacts with ie;
Under the hood, we can try to infer which API you are talking to by the url (only possible for the respective public API of github.com, gitlab.com, bitbucket.com and beyond), but we will also need the ability to explictily set the implementation through config or via The implementations should be pulled up a namespace ie;
But both implementations should respect the same public API as |
@rauhryan, I agree with you on the way to divide up namespaces. As for distinguishing which type of API is currently being used, I think the right way to do it is to
So this way, the two clients are completely independent and private to I think this is, possibly, one very good initial solution, but there's definitely room for environment. |
In addition, the Github and Gitlab client should be completely independent, and not have any And honestly, if you want to do so, there's definitely a much better way to do it. |
Yes, I like the idea of providing some parameter to a client rather than depending on the application including the right |
I agree. If I don't know, @rauhryan maybe you have a good reason for making this choice. |
My thought process is, by designing the system to be capable of defaulting the implementation by using For example, by default, ghee works just like any library. You But as far as HuBoard is concerned, the experience should be The idea is that existing users and codebases that currently use Ghee should experience a very low impact from this new work and that the breaking changes to existing applications can be as simple as |
Out of curiosity, how many projects other than Huboard depend on ghee? I can see the argument of making changes that minimize the impact of other applications. I think that's fine for now. I do think @ahimta's ideas are good and are probably worth considering for the next major release. |
I think, the most important thing now is to implement Gitlab integration. Then at least we actually have something tangible to talk about :) One important thing in software development , I think, |
I completely agree with you @ahimta, I'm on board with pushing forward with the current direction, as long as we avoid any decisions that are difficult to reverse or rollback, we should have another discussion |
Made some good progress here. I've run into a a number of missing GitLab API features that Huboard uses, so I'll look into adding them to GitLab. |
Thank you @stanhu I will try and crave out some time to review this weekend. |
Submitted a change to GitLab in preparation of supporting Huboard. I'll edit this note as I go along:
|
@stanhu looks like things are coming along great! We might also want to consider adding a Unit Test suite for translators at some point, will make tracking down any potential bugs in in translation much easier for future maintainers. Let @rauhryan or me know if you need anything! edit: Oh and 👍 on the GitLab Merge Requests!! |
@discorick Thanks! Yes, definitely I'll add tests later. I'm trying to flush out all the requirements and changes needed in GitLab as soon as possible. I've hacked huboard-web to get it to the point where I can see the first page: It looks like warden and GitHub are tightly integrated into the login flow, so I'll have to figure out how to separate that out. In huboard, do you know why |
@discorick and @rauhryan: To support GitLab and GitHub in huboard-web, can we just use a generic OAuth2 provider, such as warden-oauth2, instead of GitHub-specific one? As far as I can tell, you're not using any of the specific GitHub calls within warden-github and rely on ghee for that. |
This is the beginnings of supporting the GitLab API. The first test was to implement
Ghee.repos
. Here is a start. Notice that the endpoints are quite different:GitHub: https://developer.github.com/v3/repos/#response
GitLab: https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md#list-projects
See #26