Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fetch exact reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Nov 24, 2017
1 parent ff07a41 commit cea660d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func GitFetchPullRequest(repoPath string, pullRequestNumber string, localBranchN
time.Sleep(time.Second)

// fetch the pull request merge and head references into this repo.
ferr := remote.Fetch([]string{"+refs/pull/*:refs/remotes/origin/pr/*"}, new(git2go.FetchOptions), "")
ferr := remote.Fetch([]string{ fmt.Sprintf("+refs/pull/%s/merge:refs/remotes/origin/pr/%s/merge", pullRequestNumber, pullRequestNumber) }, new(git2go.FetchOptions), "")
if ferr != nil {
log.Print("Failed to fetch PR references from remote")
log.Print("Failed to fetch PR reference from remote")
return ferr
}

Expand Down

0 comments on commit cea660d

Please sign in to comment.