MCPcopy Create free account
hub / github.com/cli/cli / updatePullRequest

Function updatePullRequest

pkg/cmd/pr/edit/edit.go:497–508  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, id string, number int, editable shared.Editable)

Source from the content-addressed store, hash-verified

495}
496
497func updatePullRequest(httpClient *http.Client, repo ghrepo.Interface, id string, number int, editable shared.Editable) error {
498 var wg errgroup.Group
499 wg.Go(func() error {
500 return shared.UpdateIssue(httpClient, repo, id, true, editable)
501 })
502 if editable.Reviewers.Edited {
503 wg.Go(func() error {
504 return updatePullRequestReviews(httpClient, repo, id, number, editable)
505 })
506 }
507 return wg.Wait()
508}
509
510func updatePullRequestReviews(httpClient *http.Client, repo ghrepo.Interface, prID string, number int, editable shared.Editable) error {
511 if !editable.Reviewers.Edited {

Callers 1

editRunFunction · 0.70

Calls 2

UpdateIssueFunction · 0.92
updatePullRequestReviewsFunction · 0.85

Tested by

no test coverage detected