Repository: cli/cli
File: api/queries_pr.go (Go)

Code before:
		} `graphql:"... on User"`
		Bot struct {
			ID       string
			Login    string
			TypeName string `graphql:"__typename"`
		} `graphql:"... on Bot"`
	}

	if result.Node.PullRequest.SuggestedActors.Nodes != nil {
		nodes = result.Node.PullRequest.SuggestedActors.Nodes
	} else if result.Node.Issue.SuggestedActors.Nodes != nil {
		nodes = result.Node.Issue.SuggestedActors.Nodes
	}

	actors := make([]AssignableActor, 0, len(nodes)+1) // +1 in case we add viewer
	viewer := result.Viewer
	viewerLogin := viewer.Login
	viewerIncluded := false

	for _, n := range nodes {
		if n.User.TypeName == "User" && n.User.Login != "" {
			actors = append(actors, AssignableUser{id: n.User.ID, login: n.User.Login, name: n.User.Name})
			if query == "" && viewerLogin != "" && n.User.Login == viewerLogin {
				viewerIncluded = true
			}
		} else if n.Bot.TypeName == "Bot" && n.Bot.Login != "" {
			actors = append(actors, AssignableBot{id: n.Bot.ID, login: n.Bot.Login})
			if query == "" && viewerLogin != "" && n.Bot.Login == viewerLogin {
				viewerIncluded = true
			}
		}
	}

	// When query is blank, append viewer if not already present.
	if query == "" && viewerLogin != "" && !viewerIncluded {
		actors = append(actors, AssignableUser{id: viewer.ID, login: viewer.Login, name: viewer.Name})
	}
	return actors, nil
}

func UpdatePullRequestBranch(client *Client, repo ghrepo.Interface, params githubv4.UpdatePullRequestBranchInput) error {
	var mutation struct {
		UpdatePullRequestBranch struct {
			PullRequest struct {
				ID string
			}
		} `graphql:"updatePullRequestBranch(input: $input)"`
	}
	variables := map[string]interface{}{"input": params}
	return client.Mutate(repo.RepoHost(), "PullRequestUpdateBranch", &mutation, variables)
}

Review comment (suggestion):
```suggestion
		if n.TypeName == "User" && n.User.Login != "" {
			actors = append(actors, AssignableUser{id: n.User.ID, login: n.User.Login, name: n.User.Name})
			if query == "" && viewerLogin != "" && n.User.Login == viewerLogin {
				viewerIncluded = true
			}
		} else if n.TypeName == "Bot" && n.Bot.Login != "" {
```

Code after:
			ID       string
			Login    string
		} `graphql:"... on Bot"`
	}

	if result.Node.PullRequest.SuggestedActors.Nodes != nil {
		nodes = result.Node.PullRequest.SuggestedActors.Nodes
	} else if result.Node.Issue.SuggestedActors.Nodes != nil {
		nodes = result.Node.Issue.SuggestedActors.Nodes
	}

	actors := make([]AssignableActor, 0, len(nodes)+1) // +1 in case we add viewer
	viewer := result.Viewer
	viewerLogin := viewer.Login
	viewerIncluded := false

	for _, n := range nodes {
		if n.TypeName == "User" && n.User.Login != "" {
			actors = append(actors, AssignableUser{id: n.User.ID, login: n.User.Login, name: n.User.Name})
			if query == "" && viewerLogin != "" && n.User.Login == viewerLogin {
				viewerIncluded = true
			}
		} else if n.TypeName == "Bot" && n.Bot.Login != "" {
			actors = append(actors, AssignableBot{id: n.Bot.ID, login: n.Bot.Login})
			if query == "" && viewerLogin != "" && n.Bot.Login == viewerLogin {
				viewerIncluded = true
			}
		}
	}

	// When query is blank, append viewer if not already present.
	if query == "" && viewerLogin != "" && !viewerIncluded {
		actors = append(actors, AssignableUser{id: viewer.ID, login: viewer.Login, name: viewer.Name})
	}
	return actors, nil
}

func UpdatePullRequestBranch(client *Client, repo ghrepo.Interface, params githubv4.UpdatePullRequestBranchInput) error {
	var mutation struct {
		UpdatePullRequestBranch struct {
			PullRequest struct {
				ID string
			}
		} `graphql:"updatePullRequestBranch(input: $input)"`
	}
	variables := map[string]interface{}{"input": params}
	return client.Mutate(repo.RepoHost(), "PullRequestUpdateBranch", &mutation, variables)
}

func isBlank(v interface{}) bool {
	switch vv := v.(type) {