From 80d8b6c47015830b210f17c79ab3b574513035b9 Mon Sep 17 00:00:00 2001 From: xHyroM Date: Sun, 28 Aug 2022 15:36:04 +0200 Subject: [PATCH] fix(githubUtils): show number, not id in github autocomplete --- src/utils/githubUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/githubUtils.ts b/src/utils/githubUtils.ts index 574fced..74ec3a0 100644 --- a/src/utils/githubUtils.ts +++ b/src/utils/githubUtils.ts @@ -197,7 +197,7 @@ export const search = async(query: string, repository: string, state: IssueState if (!query) { const array = arrayFiltered.slice(0, 25); return array.map((issueOrPr: Issue | PullRequest) => new Object({ - name: `${issueOrPr.type.slice(-1)}${issueOrPr.id}) ${formatEmojiStatus(issueOrPr)} ${issueOrPr.title.slice(0, 93 - issueOrPr.id.toString().length).replace(githubTitleClean, '')}`, + name: `${issueOrPr.type.slice(0, -1)}${issueOrPr.number}) ${formatEmojiStatus(issueOrPr)} ${issueOrPr.title.slice(0, 93 - issueOrPr.id.toString().length).replace(githubTitleClean, '')}`, value: issueOrPr.number.toString() })) as APIApplicationCommandOptionChoice[] }