reading the reviewers length from the github object as per the dsl

This commit is contained in:
Adam Brown 2022-08-02 12:17:48 +01:00
parent 5d30026726
commit 7d120f94f6
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ const {danger, warn} = require('danger')
// warn(JSON.stringify(danger)) // warn(JSON.stringify(danger))
const pr = danger.github.pr const pr = danger.github.pr
const github = danger.github
// User who has created the PR. // User who has created the PR.
const user = pr.user.login const user = pr.user.login
const modified = danger.git.modified_files const modified = danger.git.modified_files
@ -101,6 +102,6 @@ if (hasPngs) {
} }
// Check for reviewers // Check for reviewers
if (pr.requested_reviewers.length == 0 && !pr.draft) { if (github.requested_reviewers.length == 0 && !pr.draft) {
warn("Please add a reviewer to your PR.") warn("Please add a reviewer to your PR.")
} }