Skip to content

Commit c4a0514

Browse files
committed
Remove a change meant for another PR.
1 parent 410478b commit c4a0514

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

internal/push/push.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -246,32 +246,6 @@ func (pushService *pushService) pushGit(repository *github.Repository, initialPu
246246
Auth: credentials,
247247
Progress: os.Stderr,
248248
})
249-
if err != nil && strings.Contains(err.Error(), "pre-receive hook declined") {
250-
log.Warn("Push was rejected by a pre-receive hook. This may be because force-pushing is not allowed. Will try and remove and recreate the branch.")
251-
if len(refSpecs) == 1 && refSpecs[0].String() == defaultBrachRefSpec {
252-
// todo
253-
}
254-
negativeRefSpecs := []config.RefSpec{}
255-
for _, refSpec := range refSpecs {
256-
negativeRefSpecs = append(negativeRefSpecs, config.RefSpec(":"+refSpec.Src()))
257-
err = remote.PushContext(pushService.ctx, &git.PushOptions{
258-
RefSpecs: negativeRefSpecs,
259-
Auth: credentials,
260-
Progress: os.Stderr,
261-
})
262-
if err != nil {
263-
return errors.Wrap(err, "Error removing existing refs.")
264-
}
265-
err = remote.PushContext(pushService.ctx, &git.PushOptions{
266-
RefSpecs: refSpecs,
267-
Auth: credentials,
268-
Progress: os.Stderr,
269-
})
270-
if err != nil && errors.Cause(err) != git.NoErrAlreadyUpToDate {
271-
return errors.Wrap(err, "Error pushing Action to GitHub Enterprise Server.")
272-
}
273-
}
274-
}
275249
if err != nil && errors.Cause(err) != git.NoErrAlreadyUpToDate {
276250
return errors.Wrap(err, "Error pushing Action to GitHub Enterprise Server.")
277251
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy