diff --git a/src/checks/addCommentToUncommittedPRs.test.ts b/src/checks/addCommentToUncommittedPRs.test.ts index ff87706..77d2da9 100644 --- a/src/checks/addCommentToUncommittedPRs.test.ts +++ b/src/checks/addCommentToUncommittedPRs.test.ts @@ -67,7 +67,7 @@ describe(addCommentToUncommittedPRs, () => { expect(mockAPI.issues.createComment).not.toHaveBeenCalled() }) - for (const allowed of ["Experience Enhancement", "Committed", "help wanted"]) { + for (const allowed of ["Experience Enhancement", "Committed", "Help Wanted", "help wanted"]) { it("Does not add a comment to an uncommented PR linked to a suggestion with the label " + allowed, async () => { const { mockAPI, api } = createMockGitHubClient() diff --git a/src/checks/addCommentToUncommittedPRs.ts b/src/checks/addCommentToUncommittedPRs.ts index 8c5f718..d3c3bda 100644 --- a/src/checks/addCommentToUncommittedPRs.ts +++ b/src/checks/addCommentToUncommittedPRs.ts @@ -25,11 +25,11 @@ export const addCommentToUncommittedPRs = async (api: Octokit, payload: PullRequ else { const isSuggestion = info.relatedIssues.some(issue => issue.labels?.find(l => { const name = typeof l === "string" ? l : l.name; - return name === "Suggestion" + return name?.toLowerCase() === "suggestion" })) const isCommitted = info.relatedIssues.some(issue => issue.labels?.find(l => { const name = typeof l === "string" ? l : l.name; - return name === "Committed" || name === "Experience Enhancement" || name === "help wanted" + return name?.toLowerCase() === "committed" || name?.toLowerCase() === "experience enhancement" || name?.toLowerCase() === "help wanted" })) if (isSuggestion && !isCommitted) {