Simplify variables map in SuggestedAssignableActors
Refactored the construction of the variables map by directly assigning the 'query' key, removing the conditional logic for nil assignment.
This commit is contained in:
parent
346bd8c002
commit
dc105ce7a4
1 changed files with 2 additions and 6 deletions
|
|
@ -748,12 +748,8 @@ func SuggestedAssignableActors(client *Client, repo ghrepo.Interface, assignable
|
|||
}
|
||||
|
||||
variables := map[string]interface{}{
|
||||
"id": githubv4.ID(assignableID),
|
||||
}
|
||||
if query != "" {
|
||||
variables["query"] = githubv4.String(query)
|
||||
} else {
|
||||
variables["query"] = (*githubv4.String)(nil)
|
||||
"id": githubv4.ID(assignableID),
|
||||
"query": githubv4.String(query),
|
||||
}
|
||||
|
||||
var result responseData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue