Comments (8)
I think this is broken again. Tested on 0.9+ (acc1511). I have to specify %2F
instead of a slash:
cbennett@AP-CBENNETT MINGW64 /c/work/python-gitlab (pu)
$ gitlab -c test.ini project get --id sandbox/msgparsedemo
Impossible to get object (Expecting value: line 1 column 1 (char 0))
cbennett@AP-CBENNETT MINGW64 /c/work/python-gitlab (pu)
$ gitlab -c test.ini project get --id sandbox%2Fmsgparsedemo
id: 34
path: msgparsedemo
cbennett@AP-CBENNETT MINGW64 /c/work/python-gitlab (pu)
$
from python-gitlab.
👍 Awesome, tested and fixed.
from python-gitlab.
Does this only apply to 'gitlab project' or 'gitlab project get' or should you not expect this same symbolic naming for other commands/subcomamnds that have a --project-id or --id? ex: 'gitlab project-commit-comment list --commit-id ... --project-id' This is still expecting a number.
If so I'd highly recommend this in every instance where a --project-id or --id that a group/project should be allowed.
If you agree would you like a issue per command or per subcommand or a large meta issue be alright?
from python-gitlab.
@derekschrock this works for project get
but not for other subcommands (--project-id namespace/name
doesn't work).
I'd rather have a single issue. Thanks!
from python-gitlab.
I'm able to use path%2fname
for --project-id
and --group-id
everywhere I've tried it, including subgroup projects. Though I would greatly prefer '/' instead of '%2f'.
from python-gitlab.
Appears to be a v4 issue? Works as expected in v3.
from python-gitlab.
$ gitlab project-issue list --project-id 'issues/issues' # with v3
id: 4
title: Testing123
id: 3
title: Testing
$ gitlab project-issue list --project-id 'issues/issues' # with v4
Impossible to list objects (400: {"error":"issue_iid is invalid"})
$ gitlab project-issue list --project-id 'issues%2Fissues' # with v4
iid: 2
title: Testing123
iid: 1
title: Testing
from python-gitlab.
My 100th first try at doing python but I think this should fix it?
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index 939a7cc..fb84be3 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -42,6 +42,8 @@ class GitlabCLI(object):
# parents, build the chain of managers to get to the final object.
# Instead we do something ugly and efficient: interpolate variables in
# the class _path attribute, and replace the value with the result.
+ if 'project_id' in self.args:
+ self.args['project_id'] = self.args['project_id'].replace('/', '%2F')
self.mgr_cls._path = self.mgr_cls._path % self.args
self.mgr = self.mgr_cls(gl)
from python-gitlab.
Related Issues (20)
- job.refresh() doesn't exist but is needed (hacky fix included) HOT 4
- project-merge-request-approval-state argument handling
- Missing parameters in iteration search HOT 2
- Calling list() with Iterator leads to warnings HOT 1
- refs call of commit causes wrong warning HOT 5
- member_roles endpoint is not implemented HOT 2
- Cannot remove or update project avatars HOT 1
- Wrong type on `job.trace()`? HOT 3
- Missing `latest()` method on `ProjectPipelineManager` HOT 4
- Support group-level service-accounts
- Add group.shared_with_groups.list() HOT 2
- const module not exposed
- Missing content Class Variable in ProjectFile Class HOT 3
- Improve documentation on usage of Docker image directly within Gitlab CI HOT 1
- ProjectMergeRequestApprovalManager.set_approvers cannot handle too many approval rules
- Bug: List all projects of current user returns empty list
- In CommitManager, using the path filter breaks the endpoint call HOT 3
- Feature: add `pages` support in `project`
- update CI/CD Variables with a specific env
- personal_access_tokens.rotate(<ID>) 'dict' object has no attribute 'token' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gitlab.