Skip to content

Commit

Permalink
first probot usage try config
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb committed Nov 28, 2017
1 parent 05ad4c7 commit ad767f0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/MISSING_ISSUE_TEMPLATE_AUTOREPLY.md
Original file line number Diff line number Diff line change
@@ -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).
25 changes: 25 additions & 0 deletions .github/probot.js
Original file line number Diff line number Diff line change
@@ -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.