// CheckoutPullRequest checkouts to the latest commit of a given pull request.
CheckoutPullRequest checkouts to the latest commit of a given pull request.
// CheckoutPullRequest checkouts to the latest commit of a given pull request .
func (r *repo) CheckoutPullRequest(ctx context.Context, number int, branch string) error {
	target := fmt.Sprintf("pull/%d/head:%s", number, branch)
	out, err := r.runGitCommand(ctx, "fetch", r.remote, target)
	if err != nil {
		return formatCommandError(err, out)
	}
	return r.Checkout(ctx, branch)
}
func ( r * repo ) CheckoutPullRequest ( ctx context . Context , number int , branch string ) error { target := fmt . Sprintf ( " " , number , branch ) out , err := r . runGitCommand ( ctx , " " , r . remote , target ) if err != nil { return formatCommandError ( err , out ) } return r . Checkout ( ctx , branch ) }
CheckoutPullRequest checkouts to the latest commit of a given pull request.
CheckoutPullRequest checkouts to the latest commit of a given pull request .