You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Do not perform this workflow with GitHub employees. This return
// statement only gets hit if the user is a GitHub employee
return
} 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) {
return
}
}
//
// Assuming the user is not a GitHub employee and the issue title
// does not contain the minimum number of words required, proceed.
//
// Close the issue and add the invalid label
await github.rest.issues.update({
owner: owner,
repo: repo,
issue_number: issue.number,
labels: ['invalid'],
state: 'closed'
});
// Comment on the issue
await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: issue.number,
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!`
});
// Add the issue to the Done column on the triage board