fixup deps

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-10-02 22:40:08 +03:00
parent 4cecf83b03
commit 23063e665e

View File

@ -213,6 +213,13 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[
logger.Fatalf(ctx, "failed to open repo: %v", err) logger.Fatalf(ctx, "failed to open repo: %v", err)
} }
if err = repo.FetchContext(ctx, &git.FetchOptions{
Auth: &httpauth.BasicAuth{Username: envTOKEN, Password: envTOKEN},
Force: true,
}); err != nil && err != git.NoErrAlreadyUpToDate {
logger.Fatalf(ctx, "failed to fetch repo: %v", err)
}
headRef, err := repo.Head() headRef, err := repo.Head()
if err != nil { if err != nil {
logger.Fatalf(ctx, "failed to get repo head: %v", err) logger.Fatalf(ctx, "failed to get repo head: %v", err)