@@ -49,7 +49,6 @@ def plural_name(cls):
4949class ExtraActionDefinition (object ):
5050 """Definition of a "non-standard" function"""
5151 url = ''
52- url_params = []
5352 required_params = []
5453 optional_params = []
5554
@@ -150,30 +149,21 @@ class ForkFromAction(ExtraActionDefinition):
150149 """gl.Project.fork_from(forked_from_id)"""
151150 url = '/fork/:forked_from_id'
152151 method = _HTTP_POST
153- url_params = [
154- 'forked_from_id' ,
155- ]
156152 class DeleteForkAction (ExtraActionDefinition ):
157153 """gl.Project.delete_fork()"""
158154 url = '/fork'
159155 method = _HTTP_DELETE
160156 class GetBlobAction (ExtraActionDefinition ):
161157 """gl.Project.get_blob()"""
162- url = '/repository/commits/:sha /blob'
158+ url = '/repository/commits/:sha_or_ref_name /blob'
163159 method = _HTTP_GET
164- url_params = [
165- 'sha_or_ref_name' ,
166- ]
167160 required_params = [
168161 'filepath' ,
169162 ]
170163 class ProtectBranchAction (ExtraActionDefinition ):
171164 """gl.Project.protect_branch()"""
172165 url = '/repository/branches/:branch/protect'
173166 method = _HTTP_PUT
174- url_params = [
175- 'branch' , # GitLab API is branch name
176- ]
177167 @staticmethod
178168 def wrapper (extra_action_fn , parent ):
179169 """Accept a Branch object instead of a branch name"""
@@ -189,9 +179,6 @@ class UnprotectBranchAction(ExtraActionDefinition):
189179 """gl.Project.unprotect_branch()"""
190180 url = '/repository/branches/:branch/unprotect'
191181 method = _HTTP_PUT
192- url_params = [
193- 'branch' , # GitLab API is branch name
194- ]
195182 @staticmethod
196183 def wrapper (extra_action_fn , parent ):
197184 """Accept a Branch object instead of a branch name"""
@@ -447,9 +434,6 @@ class AddProjectForUserAction(ExtraActionDefinition):
447434 """gl.add_project_for_user(user_id, name)"""
448435 url = '/projects/user/:user_id'
449436 method = _HTTP_POST
450- url_params = [
451- 'user_id' ,
452- ]
453437 required_params = [
454438 'name' ,
455439 ]
0 commit comments