docs(pr create): clarify BaseRepo type in submitPR

This commit is contained in:
Kynan Ware 2025-03-12 12:11:15 -06:00
parent 339e1a25f3
commit 028caa3823

View file

@ -812,6 +812,8 @@ func submitPR(opts CreateOptions, ctx CreateContext, state shared.IssueMetadataS
}
opts.IO.StartProgressIndicator()
// At this point, ctx.PrRefs.BaseRepo is guaranteed to be an *api.Repository
// because of https://github.com/cli/cli/blob/d29db2d44199ad4a987ea866f3f4ff601b1c90a0/pkg/cmd/pr/create/create.go#L578-L592
pr, err := api.CreatePullRequest(client, ctx.PrRefs.BaseRepo.(*api.Repository), params)
opts.IO.StopProgressIndicator()
if pr != nil {