@@ -182,7 +182,7 @@ def gist_fetch(self, snippet, fname=None):
182
182
except Exception as err :
183
183
raise ResourceNotFoundError ('Could not find snippet' ) from err
184
184
185
- return snippet .raw ().decode ('utf-8' )
185
+ return snippet .content ().decode ('utf-8' )
186
186
187
187
def gist_clone (self , gist ):
188
188
raise ArgumentError ('Snippets cannot be cloned in gitlab.' )
@@ -302,15 +302,14 @@ def request_create(self, onto_user, onto_repo, from_branch, onto_branch, title=N
302
302
if not title and not description :
303
303
raise ArgumentError ('Missing message for request creation' )
304
304
305
- request = self .gl .project_mergerequests .create (
306
- project_id = from_project .id ,
307
- data = {
308
- 'source_branch' : from_branch ,
309
- 'target_branch' : onto_branch ,
310
- 'target_project_id' : onto_project .id ,
311
- 'title' : title ,
312
- 'description' : description
313
- }
305
+ request = self .gl .projects .get (project .id ).mergerequests .create (
306
+ {
307
+ 'source_branch' : from_branch ,
308
+ 'target_branch' : onto_branch ,
309
+ 'target_project_id' : onto_project .id ,
310
+ 'title' : title ,
311
+ 'description' : description
312
+ }
314
313
)
315
314
316
315
yield '{}'
@@ -331,7 +330,7 @@ def request_list(self, user, repo):
331
330
project = self .gl .projects .get ('/' .join ([user , repo ]))
332
331
yield "{:>3}\t {:<60}\t {:2}"
333
332
yield ('id' , 'title' , 'URL' )
334
- for mr in self .gl .project_mergerequests . list ( project_id = project .id ):
333
+ for mr in self .gl .projects . get ( project .id ). mergerequests . list () :
335
334
yield ( str (mr .iid ),
336
335
mr .title ,
337
336
mr .web_url
0 commit comments