Skip to content

Commit cffd56f

Browse files
committed
Rename to mention
1 parent 8a96299 commit cffd56f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

api/queries_issue.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func IssueStatus(client *Client, repo ghrepo.Interface, currentUsername string)
198198
return &payload, nil
199199
}
200200

201-
func IssueList(client *Client, repo ghrepo.Interface, state string, labels []string, assigneeString string, limit int, authorString string, mentionedString string, milestoneString string) (*IssuesAndTotalCount, error) {
201+
func IssueList(client *Client, repo ghrepo.Interface, state string, labels []string, assigneeString string, limit int, authorString string, mentionString string, milestoneString string) (*IssuesAndTotalCount, error) {
202202
var states []string
203203
switch state {
204204
case "open", "":
@@ -212,10 +212,10 @@ func IssueList(client *Client, repo ghrepo.Interface, state string, labels []str
212212
}
213213

214214
query := fragments + `
215-
query($owner: String!, $repo: String!, $limit: Int, $endCursor: String, $states: [IssueState!] = OPEN, $labels: [String!], $assignee: String, $author: String, $mentioned: String, $milestone: String) {
215+
query($owner: String!, $repo: String!, $limit: Int, $endCursor: String, $states: [IssueState!] = OPEN, $labels: [String!], $assignee: String, $author: String, $mention: String, $milestone: String) {
216216
repository(owner: $owner, name: $repo) {
217217
hasIssuesEnabled
218-
issues(first: $limit, after: $endCursor, orderBy: {field: CREATED_AT, direction: DESC}, states: $states, labels: $labels, filterBy: {assignee: $assignee, createdBy: $author, mentioned: $mentioned, milestone: $milestone}) {
218+
issues(first: $limit, after: $endCursor, orderBy: {field: CREATED_AT, direction: DESC}, states: $states, labels: $labels, filterBy: {assignee: $assignee, createdBy: $author, mentioned: $mention, milestone: $milestone}) {
219219
totalCount
220220
nodes {
221221
...issue
@@ -243,8 +243,8 @@ func IssueList(client *Client, repo ghrepo.Interface, state string, labels []str
243243
if authorString != "" {
244244
variables["author"] = authorString
245245
}
246-
if mentionedString != "" {
247-
variables["mentioned"] = mentionedString
246+
if mentionString != "" {
247+
variables["mention"] = mentionString
248248
}
249249
if milestoneString != "" {
250250
variables["milestone"] = milestoneString

command/issue.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func init() {
4141
issueListCmd.Flags().StringP("state", "s", "open", "Filter by state: {open|closed|all}")
4242
issueListCmd.Flags().IntP("limit", "L", 30, "Maximum number of issues to fetch")
4343
issueListCmd.Flags().StringP("author", "A", "", "Filter by author")
44-
issueListCmd.Flags().StringP("mentioned", "", "", "Filter by mention")
44+
issueListCmd.Flags().StringP("mention", "", "", "Filter by mention")
4545
issueListCmd.Flags().StringP("milestone", "", "", "Filter by milestone")
4646

4747
issueCmd.AddCommand(issueViewCmd)
@@ -143,7 +143,7 @@ func issueList(cmd *cobra.Command, args []string) error {
143143
return err
144144
}
145145

146-
mentioned, err := cmd.Flags().GetString("mentioned")
146+
mention, err := cmd.Flags().GetString("mention")
147147
if err != nil {
148148
return err
149149
}
@@ -153,7 +153,7 @@ func issueList(cmd *cobra.Command, args []string) error {
153153
return err
154154
}
155155

156-
listResult, err := api.IssueList(apiClient, baseRepo, state, labels, assignee, limit, author, mentioned, milestone)
156+
listResult, err := api.IssueList(apiClient, baseRepo, state, labels, assignee, limit, author, mention, milestone)
157157
if err != nil {
158158
return err
159159
}

command/issue_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func TestIssueList_withFlags(t *testing.T) {
153153
} } }
154154
`))
155155

156-
output, err := RunCommand("issue list -a probablyCher -l web,bug -s open -A foo --mentioned me --milestone 1.x")
156+
output, err := RunCommand("issue list -a probablyCher -l web,bug -s open -A foo --mention me --milestone 1.x")
157157
if err != nil {
158158
t.Errorf("error running command `issue list`: %v", err)
159159
}
@@ -171,7 +171,7 @@ No issues match your search in OWNER/REPO
171171
Labels []string
172172
States []string
173173
Author string
174-
Mentioned string
174+
Mention string
175175
Milestone string
176176
}
177177
}{}
@@ -181,7 +181,7 @@ No issues match your search in OWNER/REPO
181181
eq(t, reqBody.Variables.Labels, []string{"web", "bug"})
182182
eq(t, reqBody.Variables.States, []string{"OPEN"})
183183
eq(t, reqBody.Variables.Author, "foo")
184-
eq(t, reqBody.Variables.Mentioned, "me")
184+
eq(t, reqBody.Variables.Mention, "me")
185185
eq(t, reqBody.Variables.Milestone, "1.x")
186186
}
187187

0 commit comments

Comments
 (0)