diff --git a/cmd/pkgdashcli/main.go b/cmd/pkgdashcli/main.go index 6d99eaa..348b215 100644 --- a/cmd/pkgdashcli/main.go +++ b/cmd/pkgdashcli/main.go @@ -213,6 +213,13 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[ 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() if err != nil { logger.Fatalf(ctx, "failed to get repo head: %v", err)