diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2022-03-22 00:55:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 00:55:36 +0800 |
commit | 3c49a6173d9cdf339f4a27d427a4cfc3dd51a24f (patch) | |
tree | 4ed73e5a8ea82695a073b74fd9b53a874f7bfca7 /internal/gitutil/pull_request.go | |
parent | d66fe583d5f1e0ea5b50aa478ae1dcf3bd69fe7c (diff) |
mod: bump github.com/gogs/git-module from 1.2.0 to 1.4.0 (#6866)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'internal/gitutil/pull_request.go')
-rw-r--r-- | internal/gitutil/pull_request.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/gitutil/pull_request.go b/internal/gitutil/pull_request.go index e35a477e..99213e05 100644 --- a/internal/gitutil/pull_request.go +++ b/internal/gitutil/pull_request.go @@ -30,12 +30,12 @@ func (module) PullRequestMeta(headPath, basePath, headBranch, baseBranch string) // We need to create a temporary remote when the pull request is sent from a forked repository. if headPath != basePath { tmpRemote := strconv.FormatInt(time.Now().UnixNano(), 10) - err := Module.RepoAddRemote(headPath, tmpRemote, basePath, git.AddRemoteOptions{Fetch: true}) + err := Module.RemoteAdd(headPath, tmpRemote, basePath, git.RemoteAddOptions{Fetch: true}) if err != nil { return nil, fmt.Errorf("add remote: %v", err) } defer func() { - err := Module.RepoRemoveRemote(headPath, tmpRemote) + err := Module.RemoteRemove(headPath, tmpRemote) if err != nil { log.Error("Failed to remove remote %q [path: %s]: %v", tmpRemote, headPath, err) return @@ -45,18 +45,18 @@ func (module) PullRequestMeta(headPath, basePath, headBranch, baseBranch string) tmpRemoteBranch = "remotes/" + tmpRemote + "/" + baseBranch } - mergeBase, err := Module.RepoMergeBase(headPath, tmpRemoteBranch, headBranch) + mergeBase, err := Module.MergeBase(headPath, tmpRemoteBranch, headBranch) if err != nil { return nil, errors.Wrap(err, "get merge base") } - commits, err := Module.RepoLog(headPath, mergeBase+"..."+headBranch) + commits, err := Module.Log(headPath, mergeBase+"..."+headBranch) if err != nil { return nil, errors.Wrap(err, "get commits") } // Count number of changed files - names, err := Module.RepoDiffNameOnly(headPath, tmpRemoteBranch, headBranch, git.DiffNameOnlyOptions{NeedsMergeBase: true}) + names, err := Module.DiffNameOnly(headPath, tmpRemoteBranch, headBranch, git.DiffNameOnlyOptions{NeedsMergeBase: true}) if err != nil { return nil, errors.Wrap(err, "get changed files") } |