chore: replace pkg/errors with cockroachdb/errors (#8098)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-22 08:20:53 -05:00
committed by GitHub
parent ae59787ff5
commit 4ee706b2bf
96 changed files with 605 additions and 564 deletions

View File

@@ -1,12 +1,11 @@
package gitutil
import (
"fmt"
"strconv"
"time"
"github.com/cockroachdb/errors"
"github.com/gogs/git-module"
"github.com/pkg/errors"
log "unknwon.dev/clog/v2"
)
@@ -28,7 +27,7 @@ func (module) PullRequestMeta(headPath, basePath, headBranch, baseBranch string)
tmpRemote := strconv.FormatInt(time.Now().UnixNano(), 10)
err := Module.RemoteAdd(headPath, tmpRemote, basePath, git.RemoteAddOptions{Fetch: true})
if err != nil {
return nil, fmt.Errorf("add remote: %v", err)
return nil, errors.Newf("add remote: %v", err)
}
defer func() {
err := Module.RemoteRemove(headPath, tmpRemote)