@@ -136,7 +136,10 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
136
136
Message : opts .Message ,
137
137
}); err != nil {
138
138
return fmt .Errorf ("CommitChanges: %v" , err )
139
- } else if err = git .Push (localPath , "origin" , opts .NewBranch ); err != nil {
139
+ } else if err = git .Push (localPath , git.PushOptions {
140
+ Remote : "origin" ,
141
+ Branch : opts .NewBranch ,
142
+ }); err != nil {
140
143
return fmt .Errorf ("git push origin %s: %v" , opts .NewBranch , err )
141
144
}
142
145
@@ -273,7 +276,10 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
273
276
Message : opts .Message ,
274
277
}); err != nil {
275
278
return fmt .Errorf ("CommitChanges: %v" , err )
276
- } else if err = git .Push (localPath , "origin" , opts .NewBranch ); err != nil {
279
+ } else if err = git .Push (localPath , git.PushOptions {
280
+ Remote : "origin" ,
281
+ Branch : opts .NewBranch ,
282
+ }); err != nil {
277
283
return fmt .Errorf ("git push origin %s: %v" , opts .NewBranch , err )
278
284
}
279
285
@@ -509,7 +515,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
509
515
Message : opts .Message ,
510
516
}); err != nil {
511
517
return fmt .Errorf ("CommitChanges: %v" , err )
512
- } else if err = git .Push (localPath , "origin" , opts .NewBranch ); err != nil {
518
+ } else if err = git .Push (localPath , git.PushOptions {
519
+ Remote : "origin" ,
520
+ Branch : opts .NewBranch ,
521
+ }); err != nil {
513
522
return fmt .Errorf ("git push origin %s: %v" , opts .NewBranch , err )
514
523
}
515
524
0 commit comments