GithubHelp home page GithubHelp logo

Add gitlab connector about twgit HOT 12 CLOSED

ltoussaint avatar ltoussaint commented on September 7, 2024
Add gitlab connector

from twgit.

Comments (12)

ltoussaint avatar ltoussaint commented on September 7, 2024

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.

from twgit.

kmarques avatar kmarques commented on September 7, 2024

Hi!

I tried your feature but i had some issues.

  • According to redmine/jira/github connectors, the default scheme is https or it's http.
  • Secondly when I tried to catch the issue title, it returned an empty string (examples on the screenshot).
  • Moreover there are some mistakes on the Gitlab API documention
    • when it refers to GET projects/:id/issues/:id_issue, :id_issue is the unique id of the issue for all the platform but this unique identifier isn't showed on the administration panel (modifying the source code, this id is shown on my screenshot as API#).
    • when it is written that we can access a project by its namespace/path thanks to %2F, it's wrong since a long time referring gitlabhq/gitlabhq#4921

image

I tried to create a gitlab connector here

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

Hi kmarques

  • For the defaut scheme, we can always define https.
    If the gitlab installation doesn't support it, we just have to write http:// in configuration

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

  • I get the title using only a call for /projects/:id/issues/:id_issues (I test it with twgit feature list)
  • I'm able to access project using namespace/path (and %2F). Maybe there is a problem with some characters?

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

from twgit.

kmarques avatar kmarques commented on September 7, 2024

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

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

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?

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

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

from twgit.

geoffroy-aubry avatar geoffroy-aubry commented on September 7, 2024

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

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

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?

from twgit.

geoffroy-aubry avatar geoffroy-aubry commented on September 7, 2024

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…

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

Yes it's a good solution.

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

@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.

from twgit.

ltoussaint avatar ltoussaint commented on September 7, 2024

Done by pull request #145

from twgit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.