Skip to content

Commit

Permalink
Adds body checks, and PR assignee checks - fixes #5 fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Sep 12, 2017
1 parent 1da877c commit 9cbe382
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 17 deletions.
20 changes: 17 additions & 3 deletions org/all-prs.ts
@@ -1,9 +1,23 @@
import { schedule } from "danger"
import { schedule, danger, warn, fail } from "danger"
const pr = danger.github.pr

// Check for dependency changes
// Highlight package dependencies on Node projects.
import yarn from "danger-plugin-yarn"
schedule(yarn())

// Check out docs
// Keep our Markdown documents awesome
import spellcheck from "danger-plugin-spellcheck"
schedule(spellcheck({ settings: "artsy/artsy-danger@spellcheck.json" }))

// RFC: #5 - No PR is too small to warrant a paragraph or two of summary
// https://github.com/artsy/artsy-danger/issues/5
if (pr.body.length === 0) {
fail("Please add a description to your PR.")
}

// RFC: #13 - Always ensure we assign someone, so that our Slackbot work correctly
// https://github.com/artsy/artsy-danger/issues/13
const wipPR = pr.title.includes("WIP ") || pr.title.includes("[WIP]")
if (!wipPR && pr.assignee === null) {
warn("Please assign someone to merge this PR, and optionally include people who should review.")
}
32 changes: 18 additions & 14 deletions yarn.lock
Expand Up @@ -144,11 +144,10 @@ babel-messages@^6.8.0:
dependencies:
babel-runtime "^6.22.0"

babel-polyfill@^6.20.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
babel-polyfill@7.0.0-alpha.19:
version "7.0.0-alpha.19"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-7.0.0-alpha.19.tgz#546aabf80c92f4e9314176a64458a6258e5970de"
dependencies:
babel-runtime "^6.22.0"
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

Expand Down Expand Up @@ -416,14 +415,14 @@ danger-plugin-yarn@^0.3.2:
esdoc "^0.5.2"

danger@^2.0.0-alpha.8:
version "2.0.0-alpha.8"
resolved "https://registry.yarnpkg.com/danger/-/danger-2.0.0-alpha.8.tgz#b915b16ac5fcd5315142da5d560a3e774cc61693"
version "2.0.0-alpha.15"
resolved "https://registry.yarnpkg.com/danger/-/danger-2.0.0-alpha.15.tgz#e04586197977663f6e9b510c2d38cfb715da317d"
dependencies:
babel-polyfill "^6.20.0"
babel-polyfill "7.0.0-alpha.19"
chalk "^2.0.0"
commander "^2.9.0"
debug "^3.0.0"
github "^9.2.0"
github "^10.0.0"
jsome "^2.3.25"
jsonpointer "^4.0.1"
lodash.find "^4.6.0"
Expand All @@ -433,6 +432,7 @@ danger@^2.0.0-alpha.8:
node-fetch "^1.6.3"
parse-diff "^0.4.0"
parse-link-header "^1.0.1"
pinpoint "^1.1.0"
rfc6902 "^1.3.0"
vm2 patriksimek/vm2
voca "^1.2.0"
Expand Down Expand Up @@ -687,9 +687,9 @@ github-webhook-event-types@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/github-webhook-event-types/-/github-webhook-event-types-1.0.0.tgz#54e9953e4912d2a0e844c29a9acae26ea7233e61"

github@^9.2.0:
version "9.2.0"
resolved "https://registry.yarnpkg.com/github/-/github-9.2.0.tgz#8a886dc40dd63636707dcaf99df3df26c59f16fc"
github@^10.0.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/github/-/github-10.1.0.tgz#cfa4ebaccfa67635032d7e6e578bb75ed2b2bd96"
dependencies:
follow-redirects "0.0.7"
https-proxy-agent "^1.0.0"
Expand Down Expand Up @@ -1307,6 +1307,10 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"

pinpoint@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874"

pkginfo@^0.4.0:
version "0.4.1"
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff"
Expand Down Expand Up @@ -1650,9 +1654,9 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

vm2@patriksimek/vm2:
version "3.4.6"
resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/0711926ba6e6fbfb89277d8033cfd11b69888e46"
"vm2@github:patriksimek/vm2":
version "3.5.0"
resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/4099c15efa36e9ff9076ed42a4bad25a8243eeba"

voca@^1.2.0:
version "1.3.0"
Expand Down

0 comments on commit 9cbe382

Please sign in to comment.