sparkfabrik / sparktool

Sparktool CLI
3 stars 0 forks source link

Gitlab: Enable the use of project name on "gitlab_project_id" configuration parameter #72

Open paolomainardi opened 9 years ago

paolomainardi commented 9 years ago

I've spent almost an afternoon just to understand that the "gitlab_project_id" parameter gets just the numeric project id, which is quite impossible to find using the UI, i found it using postman getting all the projects.

We need to simplify that, giving to the use the possibility to use:

Example from an API response

`"name":"Test project","name_with_namespace":"Test project / Test project","path":"test-project",`

Then we'll convert it at runtime using the api/v3/projects API.

vincenzodibiaggio commented 9 years ago

Sorry for the wasted time, I don't have well documented this aspect. Gitlab api provide only the /search endpoint to find a project through his name.

If we need to manage this aspect of our application, I guess that is better if we create a 'configuration tool' via CLI that pre-populate all the configuration file before the first call of the application [1] instead a boilerplate only for this case. What do you think about this idea?

[1] What is your gitlab id? Your redmine key? Your redmine project? Your gitlab project?

paolomainardi commented 9 years ago

I like the idea of a configuration management, but we can implement it in another story.

We should implement here just the handler to translate the project-name to the numeric-id as expected by gitlab api, maybe calling the api/v3/projects or api/search, if can't be translated an exception will be raised to the user explaining how to grab it from the gitlab UI.

vincenzodibiaggio commented 9 years ago

MR https://github.com/sparkfabrik/sparktool/pull/75 if you like the implementation I will write tests

paolomainardi commented 8 years ago

@vincenzodibiaggio help me to understand if this issue is still valid.