MCPcopy Create free account
hub / github.com/appleboy/drone-git-push / HandlePush

Method HandlePush

plugin.go:234–248  ·  view source on GitHub ↗

HandlePush pushs the changes to the remote repo.

(ctx context.Context)

Source from the content-addressed store, hash-verified

232
233// HandlePush pushs the changes to the remote repo.
234func (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
251func (p Plugin) HandleRebase(ctx context.Context) error {

Callers 1

ExecMethod · 0.95

Calls 3

RemotePushMirrorFunction · 0.92
RemotePushNamedBranchFunction · 0.92
executeFunction · 0.85

Tested by

no test coverage detected