From 6e6f857395b8a358cd8768f8bb8296791fdad312 Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Wed, 25 Aug 2021 14:53:17 -0500 Subject: [PATCH] More instructive comment in potentially spammy issues (#21110) * More instructive comment in spammy issue comments Co-authored-by: Janice --- .github/workflows/check-for-spammy-issues.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-for-spammy-issues.yml b/.github/workflows/check-for-spammy-issues.yml index 42f38895c3..9e66ffab7d 100644 --- a/.github/workflows/check-for-spammy-issues.yml +++ b/.github/workflows/check-for-spammy-issues.yml @@ -23,7 +23,7 @@ jobs: const repo = 'docs' const titleWordCount = issue.title.trim().split(' ').length - const titleWordCountMin = 2 + const titleWordCountMin = 3 try { await github.teams.getMembershipForUserInOrg({ @@ -35,18 +35,18 @@ jobs: // Do not perform this workflow with GitHub employees. This return // statement only gets hit if the user is a GitHub employee return - } catch(err) { + } catch (err) { // An error will be thrown if the user is not a GitHub employee // If a user is not a GitHub employee, we should check to see if title has at least the minimum required number of words in it and if it does, we can exit the workflow - if(titleWordCount > titleWordCountMin) { + if (titleWordCount >= titleWordCountMin) { return } } // // Assuming the user is not a GitHub employee and the issue title - // has the minimum number of words required, proceed. + // does not contain the minimum number of words required, proceed. // // Close the issue and add the invalid label @@ -63,7 +63,7 @@ jobs: owner: owner, repo: repo, issue_number: issue.number, - body: "This issue appears to have been opened accidentally. I'm going to close it now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!" + body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title or ask any questions in [discussions](https://github.com/github/docs/discussions)!` }); // Add the issue to the Done column on the triage board