MCPcopy
hub / github.com/cli/cli / updatePullRequest

Function updatePullRequest

pkg/cmd/pr/edit/edit.go:413–424  ·  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

411}
412
413func updatePullRequest(httpClient *http.Client, repo ghrepo.Interface, id string, number int, editable shared.Editable) error {
414 var wg errgroup.Group
415 wg.Go(func() error {
416 return shared.UpdateIssue(httpClient, repo, id, true, editable)
417 })
418 if editable.Reviewers.Edited {
419 wg.Go(func() error {
420 return updatePullRequestReviews(httpClient, repo, id, number, editable)
421 })
422 }
423 return wg.Wait()
424}
425
426func updatePullRequestReviews(httpClient *http.Client, repo ghrepo.Interface, prID string, number int, editable shared.Editable) error {
427 if !editable.Reviewers.Edited {

Callers 1

editRunFunction · 0.70

Calls 3

UpdateIssueFunction · 0.92
updatePullRequestReviewsFunction · 0.85
WaitMethod · 0.65

Tested by

no test coverage detected