Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
ae3a5ec
Initialize issue labeller bot
strugee Jun 19, 2017
cee5ed2
Import Probot plugin template
strugee Jun 19, 2017
9b5dff3
Switch back to Perjury
strugee Jul 8, 2017
300caa2
Add a basic development.md
strugee Jul 8, 2017
29f4809
Start writing an issue-parsing function
strugee Jul 8, 2017
5ce47b2
Add more parsing testcases
strugee Jul 8, 2017
9ffe0ce
Add issue template
strugee Jul 8, 2017
151f47b
Make sure the parser can handle Markdown comments
strugee Jul 8, 2017
1b9d2de
Make the parser more strict about issue type
strugee Jul 8, 2017
492501c
Sketch out a basic issue responder
strugee Jul 8, 2017
e28d62e
Fix index.js not finding webhook data
strugee Jul 8, 2017
dfd6b76
Test that the parser can handle null bodies
strugee Jul 8, 2017
a478a5e
Use the Probot logger
strugee Jul 8, 2017
4e4dfe5
Make parse-test use strict mode
strugee Jul 15, 2017
8800f33
Factor out the new issue handler
strugee Jul 15, 2017
b4416dd
Start testing the new issue handler
strugee Jul 15, 2017
9adee73
Start writing a context mock
strugee Jul 15, 2017
e5a26f7
Test new issue handler invocation with context
strugee Jul 15, 2017
3616173
Move Lodash require to the proper place
strugee Jul 15, 2017
91075bc
Handle descriptions being blank
strugee Aug 1, 2017
f8c696a
Add some comments
strugee Aug 1, 2017
9617d32
Fix an assert.ifError not actually passing err
strugee Aug 1, 2017
233f6d7
Make .issue() in the context mock a Sinon spy
strugee Aug 1, 2017
b89e15e
Add a couple TODO comments
strugee Aug 1, 2017
6a57756
Stub out context.github.issues.createComment()
strugee Aug 1, 2017
78ab514
Don't make the context issue factory a stub
strugee Aug 1, 2017
1ffd545
Add a TODO
strugee Aug 1, 2017
8faa4cb
Allow mocking the body of issue contexts
strugee Aug 1, 2017
84bdd86
Test different kinds of incoming issues
strugee Aug 1, 2017
29d1ec2
Actually post the comment with problems
strugee Aug 1, 2017
e3062ec
Test problematic issue body handling
strugee Aug 1, 2017
e1c6cab
Add package-lock.json
strugee Aug 1, 2017
704ed82
Factor out validation into a different module
strugee Aug 1, 2017
adf4639
Test validation of correct issues
strugee Aug 1, 2017
8d24657
Remove outdated TODO
strugee Aug 1, 2017
e5673d7
Support issue edits
strugee Aug 1, 2017
f2f2e63
Affirmatively say the user fixed issues via edits
strugee Aug 1, 2017
888c718
Only use one const statement in index.js
strugee Aug 1, 2017
d3d581c
Switch from XO to ESLint
strugee Aug 1, 2017
fdd3a91
Fix ESLint errors
strugee Aug 1, 2017
cdc8017
Load Alexa rankings at boot
strugee Aug 2, 2017
77fc7e0
Nuke outdated TODOs
strugee Aug 2, 2017
3f6ebd4
Add a TODO
strugee Aug 2, 2017
e7ef964
Fix Alexa domains not being loaded properly
strugee Aug 2, 2017
7197a49
Label new issues
strugee Aug 2, 2017
00f52de
Add a mock for Alexa results
strugee Aug 2, 2017
992500e
Pass an Alexa mock in the new issue handler test
strugee Aug 2, 2017
01a133b
Factor out labeling into its own module
strugee Aug 2, 2017
85e6b69
Remove stray debugger statement
strugee Aug 2, 2017
7e11d4e
Fix Array#indexOf in the Alexa mock
strugee Aug 2, 2017
246456d
Mock out addLabels() in the context
strugee Aug 2, 2017
28a0dc9
Increase Alexa mock size
strugee Aug 2, 2017
0f85d8d
Fix some bugs in the Alexa mock
strugee Aug 2, 2017
ba550a4
Test top 1k domain labeling too
strugee Aug 2, 2017
ae23f3d
Run the labeler for edits too
strugee Aug 2, 2017
223f2b6
Add a TODO
strugee Aug 2, 2017
7557209
Squash ESLint errors
strugee Aug 2, 2017
17b6ad1
Factor out handler setup into a common module
strugee Aug 2, 2017
015339c
DRY up issue create/edit handler tests
strugee Aug 3, 2017
9e3194a
Remove outdated TODO
strugee Aug 3, 2017
a4c874c
Don't make the edit handler an AsyncFunction
strugee Aug 3, 2017
8bb322c
Test that handlers label issues
strugee Aug 3, 2017
d7df641
Eliminate edit handler race condition
strugee Aug 3, 2017
0dd85ee
Squash more linter errors
strugee Aug 3, 2017
bebeac6
Test that freeform comments work
strugee Aug 3, 2017
8670a29
Switch to AGPL
strugee Aug 3, 2017
c75c283
Add AGPL comment headers
strugee Aug 3, 2017
7d207e2
Add copyright notices
strugee Aug 3, 2017
0c70ce2
Bump to probot@0.8.0
strugee Aug 3, 2017
39c25ac
Clarify a TODO
strugee Aug 7, 2017
62f7f04
Test that we handle colons in freeform comments
strugee Aug 7, 2017
412a084
Make sure we can handle Markdown links
strugee Aug 7, 2017
33b86f7
Move some handler tests to the parse module test
strugee Aug 14, 2017
0f51c43
Add WIP code to normalize URLs to domains
strugee Aug 15, 2017
bff589b
Allow issue type of "other"
strugee Aug 23, 2017
e43bab2
Enforce semicolons
strugee Aug 23, 2017
ef46ac2
Fix indentation
strugee Aug 23, 2017
c789c33
Fix undefined domains typecasting to a string
strugee Aug 23, 2017
4da30b9
Fix full URL parsing
strugee Aug 23, 2017
0ecb459
Remove issue-format-bot .travis.yml
strugee Aug 24, 2017
7b2dd77
Remove full AGPL headers
strugee Aug 24, 2017
e45db86
Make issue-format-bot indentation 2 spaces
strugee Aug 24, 2017
13baa7e
Refresh Alexa data daily
strugee Aug 24, 2017
3a07d85
Add logging to Alexa refreshes
strugee Aug 24, 2017
160697a
Look for issues with zero or >1 types provided
strugee Aug 28, 2017
4c5e5eb
DRY up test/lib/handlerutil
strugee Aug 28, 2017
6b0c362
Remove .js extension in a require()
strugee Aug 28, 2017
6514a6d
Note how to handle >1 domain in ISSUE_TEMPLATE.md
strugee Aug 28, 2017
ce1f525
Clean up .eslintrc
strugee Aug 28, 2017
7bc8bb7
Add explanatory comment
strugee Sep 17, 2017
9b31fff
Pass through arguments to context.issue() mock
strugee Sep 17, 2017
c073195
Assert on API calls, not context creation
strugee Sep 17, 2017
8ce6a67
Refactor labeler-test
strugee Sep 17, 2017
8efbc20
Remove old top-* labels
strugee Sep 17, 2017
1d98812
Expand README.md
strugee Sep 17, 2017
1c4e918
Don't error when we remove labels
strugee Sep 17, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Please fill out ALL information here, and don't mess with the formatting. -->
<!-- HTTPS Everywhere uses a bot to manage issues and if you change things, it won't be able to understand. -->

<!-- Delete all but one of the next five lines to indicate the type of issue you're filing. -->
Type: ruleset issue
Type: new ruleset
Type: code issue
Type: feature request
Type: other

<!-- If you're reporting a ruleset issue, fill out this section. -->
<!-- If you want to report subdomains, fill in the top-level domain here and make a note of the subdomain below. -->
<!-- If you want to report two separate domains, please open two separate issues. -->
Domain:
3 changes: 3 additions & 0 deletions utils/issue-format-bot/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The ID of your GitHub integration
INTEGRATION_ID=
WEBHOOK_SECRET=development
165 changes: 165 additions & 0 deletions utils/issue-format-bot/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"parserOptions": {
"ecmaVersion": 2017
},
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended"
],
"rules": {
"array-callback-return": "error",
"array-element-newline": "off",
"arrow-parens": [
"error",
"as-needed"
],
"arrow-spacing": [
"error",
{
"after": true,
"before": true
}
],
"block-spacing": "error",
"brace-style": [
"error",
"1tbs"
],
"callback-return": "error",
"camelcase": "error",
"capitalized-comments": "off",
"comma-dangle": "error",
"comma-spacing": [
"error",
{
"after": true,
"before": false
}
],
"comma-style": [
"error",
"last"
],
"complexity": "error",
"consistent-return": "off",
"curly": "off",
"default-case": "off",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"func-names": "off",
"func-style": [
"error",
"declaration"
],
"handle-callback-err": "error",
"indent": [2, 2],
"key-spacing": "error",
"keyword-spacing": [
"error",
{
"after": true,
"before": true
}
],
"linebreak-style": [
"error",
"unix"
],
"lines-around-comment": "error",
"no-await-in-loop": "error",
"no-bitwise": "error",
"no-buffer-constructor": "error",
"no-caller": "error",
"no-confusing-arrow": "error",
"no-continue": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-mixed-operators": "error",
"no-mixed-requires": "off",
"no-mixed-spaces-and-tabs": "error",
"no-multi-spaces": "error",
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-path-concat": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-spaced-func": "error",
"no-sync": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unused-expressions": "error",
"no-use-before-define": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-var": "error",
"no-warning-comments": "off",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-spacing": [
"error",
"never"
],
"object-property-newline": "error",
"one-var": "off",
"one-var-declaration-per-line": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-promise-reject-errors": "error",
"quotes": [
"error",
"single"
],
"require-await": "error",
"rest-spread-spacing": "error",
"semi": [
"error",
"always"
],
"semi-spacing": "error",
"semi-style": [
"error",
"last"
],
"space-before-blocks": "error",
"space-in-parens": [
"error",
"never"
],
"space-infix-ops": "error",
"spaced-comment": [
"error",
"always"
],
"strict": "error",
"unicode-bom": [
"error",
"never"
],
"vars-on-top": "error",
"yoda": [
"error",
"never"
]
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems overly strict and not very readable. Let's trim this down a bit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hainish fair enough. This is just the result of ESLint's config autogeneration (based on existing source code), so I'm not 100% sure what's actually in there, just that it matches what I've already been writing. I can try to trim it down though.

60 changes: 60 additions & 0 deletions utils/issue-format-bot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

*.pem
Loading