HandlePush pushs the changes to the remote repo.
(ctx context.Context)
| 232 | |
| 233 | // HandlePush pushs the changes to the remote repo. |
| 234 | func (p Plugin) HandlePush(ctx context.Context) error { |
| 235 | if p.Config.Mirror { |
| 236 | return execute(repo.RemotePushMirror(ctx, p.Config.RemoteName)) |
| 237 | } |
| 238 | |
| 239 | var ( |
| 240 | name = p.Config.RemoteName |
| 241 | local = p.Config.LocalBranch |
| 242 | branch = p.Config.Branch |
| 243 | force = p.Config.Force |
| 244 | followtags = p.Config.FollowTags |
| 245 | ) |
| 246 | |
| 247 | return execute(repo.RemotePushNamedBranch(ctx, name, local, branch, force, followtags)) |
| 248 | } |
| 249 | |
| 250 | // HanldeRebase pull rebases before pushing |
| 251 | func (p Plugin) HandleRebase(ctx context.Context) error { |
no test coverage detected