Permalink
Browse files

first probot usage try config

  • Loading branch information...
LeoColomb committed Nov 27, 2017
1 parent 05ad4c7 commit ad767f0f52c6d781b9c799d0226e96f71c60320f
Showing with 29 additions and 0 deletions.
  1. +4 −0 .github/MISSING_ISSUE_TEMPLATE_AUTOREPLY.md
  2. +25 −0 .github/probot.js
@@ -0,0 +1,4 @@
Hey @{{ sender.login }}, thanks for opening an issue!
Unfortunately, it seems you are missing information from the [issue template](/.github/ISSUE_TEMPLATE.md).
Please provide all nexxessary information as described in our [contribution guidelines](/.github/CONTRIBUTING.md).
View
@@ -0,0 +1,25 @@
/**
* Enforce Issue Template review
*/
on('issues.opened')
.filter(context => !context.issue.body.match(/### Reproducible bug summary/)
|| context.issue.body.includes('- [ ]'))
.comment(contents('.github/MISSING_ISSUE_TEMPLATE_AUTOREPLY.md'))
.label('insufficient-info');
/**
* Minimize comment length
*/
on('issue_comment.created')
.filter(context => context.payload.comment.body
.trim()
.replace(/\s+/gi, ' ')
.split(' ')
.length > 200
)
.comment(`
Thanks for your comment, @{{ sender.login }}!
Your reply is very long, and even if for me it takes less than a second to
read it, summarizing it a bit will help old-fashioned humans. :smiley:
`);

0 comments on commit ad767f0

Please sign in to comment.