Skip to content

Commit

Permalink
Merge pull request #74 from vitessio/fetch-by-prnum
Browse files Browse the repository at this point in the history
Fetch by PR number rather than ref
  • Loading branch information
frouioui committed Jan 25, 2024
2 parents a3bd3d3 + ef4114f commit 40c6cda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/pull_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ func (h *PullRequestHandler) createCobraDocsPreviewPR(

remote := pr.GetBase().GetRepo().GetCloneURL()
ref := pr.GetBase().GetRef()
if err := vitess.FetchRef(ctx, remote, ref); err != nil {
return nil, errors.Wrapf(err, "Failed to fetch %s:%s to %s for %s", remote, ref, op, pr.GetHTMLURL())
if err := vitess.FetchRef(ctx, "origin", fmt.Sprintf("refs/pull/%d/head", pr.GetNumber())); err != nil {
return nil, errors.Wrapf(err, "Failed to fetch Pull Request %s/%s#%d to %s for %s", vitess.Owner, vitess.Name, pr.GetNumber(), op, pr.GetHTMLURL())
}

if err := vitess.Checkout(ctx, "FETCH_HEAD"); err != nil {
Expand Down

0 comments on commit 40c6cda

Please sign in to comment.