Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a2f1efe

Browse filesBrowse files
author
Adrien "ze" Urban
committed
list: allow --project or --group with name lookup
1 parent 8e9171c commit a2f1efe
Copy full SHA for a2f1efe

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Open diff view settings
Collapse file

‎gitlab.py‎

Copy file name to clipboardExpand all lines: gitlab.py
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ def rawDelete(self, path):
186186
def list(self, obj_class, **kwargs):
187187
missing = []
188188
for k in obj_class.requiredListAttrs:
189+
if k not in kwargs:
190+
if k == 'group_id' and 'group' in kwargs:
191+
name = kwargs['group']
192+
for g in self.list(Group):
193+
if g.__dict__['name'] == name:
194+
kwargs['group_id'] = g.__dict__['id']
195+
if k == 'project_id' and 'project' in kwargs:
196+
name = kwargs['project']
197+
for p in self.list(Project):
198+
if p.__dict__['path_with_namespace'] == name:
199+
kwargs['project_id'] = p.__dict__['id']
189200
if k not in kwargs:
190201
missing.append(k)
191202
if missing:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.