Twenga / twgit

Twgit is a free and open source assisting tools for managing features, hotfixes and releases on Git repositories. It provides simple, high-level commands to adopt the branching model describes in our documentation. Supported OS: Debian/Ubuntu Linux, Mac OS X 10.8 (Mountain Lion) or lower.
http://twgit.twenga.com/
Other
111 stars 34 forks source link

Add gitlab connector #142

Closed ltoussaint closed 10 years ago

ltoussaint commented 10 years ago

Add gitlab connector

ltoussaint commented 10 years ago

It's done on the feature

Also, I move wget and curl (I just added) detection on compatibility.inc.sh. The goal was to be able to "mock" if wget and/or curl exist because the test was buggy without wget installed.

kmarques commented 10 years ago

Hi!

I tried your feature but i had some issues.

image

I tried to create a gitlab connector here

ltoussaint commented 10 years ago

Hi kmarques

For other problems, what is your version of gitlab. Mine is GitLab 7.2.1 ff1633f, so :

For :id_issue, you're right. I tried with a new gitlab installation with only one project so I didn't see this problem. You already found the solution in your feature by calling the list of issues and getting the one having the good iid

kmarques commented 10 years ago

Hi

Indeed my version of Gitlab wasn't the last one 7.1.1, so I upgraded it to the last one:

$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System:         Debian 7.5
Current User:   git
Using RVM:      no
Ruby Version:   2.1.2p95
Gem Version:    2.2.2
Bundler Version:1.7.1.
Rake Version:   10.3.2
Sidekiq Version:2.17.0

GitLab information
Version:        7.2.1
Revision:       ff1633f
Directory:      /home/git/gitlab
DB Adapter:     postgresql
URL:            http://xxxxxxx
HTTP Clone URL: http://xxxxxx/some-project.git
SSH Clone URL:  git@xxxxxx:some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        1.9.7
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

and I tried but it failed again tying to search the project by the namespace/name. I took a screenshot: image

ltoussaint commented 10 years ago

It's really strange. For me, it works on Debian 7.5 stable (Wheezy) (64bits) and OSX V10.9.4

Did you try on your browser? When I look at the gitlabhq code, I see it manages projects api call with group/project.

Maybe there is a problem with %2F character on some OS. Can you check there is the %2F string in your access logs?

ltoussaint commented 10 years ago

Or maybe it's a problem with the server configuration where your gitlab is...

geoffroy-aubry commented 10 years ago

OK, we have two gitlab connectors :-) If Karl's connector works in Laurent's env, maybe keep the former (with curl addon)?

ltoussaint commented 10 years ago

Yes, I will test it asap.

And maybe, to prevent calling the /projects api url for each new feature, we could store the :id_project in a local file and then only call projects/:id_project/issues url.

What do you think?

geoffroy-aubry commented 10 years ago

Currently twgit feature list could make one only call to retrieve :id_project regardless of the number of features, by simple use of suited variable :-) Acceptable (O(1)), very easy, and no file cache to handle…

ltoussaint commented 10 years ago

Yes it's a good solution.

ltoussaint commented 10 years ago

@kmarques : your feature works on my debian system. But your feature is a fork of Hi-Media/twgit, maybe you should fork from Twenga/twgit and then create a pull request with a new release (I will create) as target.

Then I will create a new issue to add curl.

ltoussaint commented 10 years ago

Done by pull request #145