Skip to content
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

Use project names instead of their ids when connecting to Gitlab #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stex
Copy link
Collaborator

@stex stex commented May 1, 2016

See #5

Gitlab::Client::#project is used directly when creating issues and validating the issue tracker instead of iterating over all existing projects.

stex added 2 commits May 1, 2016 19:30
* Search for projects directly instead of listing all available ones
* Use the saved project name when creating a new issue
@project_id ||= with_gitlab(gitlab_url, token) do |g|
g.projects.auto_paginate.detect { |p| p.path_with_namespace == project }.try(:id)
def urlized_project_name(project_name = options[:path_with_namespace])
project_name.gsub('/', '%2F')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if its appropriate here, but you can use URI#encode if the intention is to encode the whole string. The second argument to encode is an additional set of characters to encode beyond the standard ones. URI.encode(project_name, '/') for example.

@stevecrozz
Copy link
Member

stevecrozz commented May 2, 2016

Looks good to me @stex. Do you want to write any tests or docs before we merge it? Are there any changes that users will have to make to upgrade from v1.0.1 to v1.0.2?

@stex
Copy link
Collaborator Author

stex commented May 8, 2016

@stevecrozz I'll write a test suite in the next days, definitely a good idea to have one.

Are there any changes that users will have to make to upgrade from v1.0.1 to v1.0.2?

Not as far as I know. I would have changed the major version if they'd have to.

@stevecrozz
Copy link
Member

Are you still using this @stex? I'd be happy to hand you a commit bit if you want it. I'm finding this project has dropped a lot on my priority list.

@stex
Copy link
Collaborator Author

stex commented Aug 3, 2018

@stevecrozz We moved away from Errbit a while ago as we needed more detailed error reporting and I unfortunately haven't had much time for any open source project lately that wasn't directly part of my daily work.

I totally forgot about this PR and will try to finish it as soon as possible, but I don't think I'll find the time to further contribute to this for the above mentioned reasons. Sorry about that and especially this old PR that was never finished...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants