huboard / ghee

This is an unofficial ruby client for the Github API. The end goal is a complete, simple, and intuitive ruby API for all things Github.
http://documentup.com/huboard/ghee
MIT License
160 stars 51 forks source link

GitLab API support #26

Open XVilka opened 9 years ago

XVilka commented 9 years ago

See specification here:

https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/api

eleazan commented 9 years ago

+1

dfeyer commented 9 years ago

+1

manicminer commented 9 years ago

You know there are plenty of Gitlab clients to choose from: https://about.gitlab.com/applications/

agb80 commented 9 years ago

+1

b-sh commented 9 years ago

:+1:

gsmethells commented 9 years ago

:+1:

StephenOTT commented 9 years ago

Has anyone tried this yet? Just looking at it, and thinking about giving it a try

knvpk commented 8 years ago

+1

rauhryan commented 8 years ago

For anyone that is interested in claiming the GitLab support bounty.

Feel free to contact me personally via email or DM me on twitter if you have any questions regarding the somewhat unusual metaprogramming techniques in Ghee or my opinions on how the GitLab integration should best be implemented

Contant info: :email: rauh.ryan@huboard.com :bird: rauhryan

Ryan Rauh CEO & FOUNDER HuBoard, Inc github: rauhryan | twitter: rauhryan

stanhu commented 8 years ago

I'm curious how you envision managing the differences between GitLab and GitHub APIs. For example, GitHub has a concept of organizations and teams, while GitLab only has namespaces/groups. Also, naming is a bit different:

  1. Pull requests -> Merge requests
  2. Gists -> Snippets

I have a feeling that some work would have to be made in the GitLab API to include all the features used by ghee. For example, the filtering parameters may not all be supported (e.g. mentioned).

rauhryan commented 8 years ago

I think the easiest way is to make Ghee behave as similarly to the GitHub API as possible.

Perhaps Ghee can be an abstraction that provides the lowest common denominator to both API's

For example, the filtering parameters may not all be supported (e.g. mentioned).

HuBoard currently doesn't use this functionality, it's probably "ok" to have some filters that silently don't work when in GitLab mode.

I think the first step to GitLab support, or at least where *I* would start, is namespacing all the GitHub stuff under a Module

rauhryan commented 8 years ago

It's worth noting that whomever picks up this bounty can expect that myself and my team will be available to mentor and help whenever needed

stanhu commented 8 years ago

Thanks, @rauhryan. I'll take a crack at it since I'm fairly familiar with the GitLab and GitHub APIs.

rauhryan commented 8 years ago

Awesome!

Open a PR as early as possible and we'll keep an eye on it and give you feedback.

Let me know if you need help getting the test suite going, it's currently a bit of a pain in the ass because it's technically integration tests directly against the GitHub API

discorick commented 8 years ago

@rauhryan @stanhu , I propose we divide individual steps for this project into Ghee issues with the label "GitLab", and track them via https://huboard.com/huboard/ghee

stanhu commented 8 years ago

@rauhryan Not sure if this is the right place to ask, but I've set up my settings.yml appropriately, and I can run Ghee commands just fine with those credentials. But when I try to run the spec, I get odd Unauthorized errors:

$ rspec spec/ghee/api/authorizations_spec.rb 
Failures:

  1) Ghee::API::Authorizations#authorizations#list should return a list of auths
     Failure/Error: auth.size().should > 0
     Ghee::Unauthorized:
       Requires authentication
     # ./lib/ghee/errors.rb:91:in `on_complete'
     # ./lib/ghee/resource_proxy.rb:68:in `subject'
     # ./lib/ghee/resource_proxy.rb:51:in `method_missing'
     # ./spec/ghee/api/authorizations_spec.rb:11:in `block (4 levels) in <top (required)>'
     # ./spec/ghee/api/authorizations_spec.rb:8:in `block (3 levels) in <top (required)>'

Finished in 0.02637 seconds
1 example, 1 failure

I've verified the connection is setting the headers appropriately. Have you seen this before?

rauhryan commented 8 years ago

That test is particularly interesting, it requires a username and password and basic auth.

Please ignore it for the time being because I wouldn't recommend putting your username and password on disk in the settings.yml

Is there a way to tag a test as explict in rspec?