From a352e4a55f0f8842fb9ac1cc7b01fecbd1d9d752 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Tue, 4 Jun 2019 17:42:00 -0400 Subject: [PATCH] React when draft pull requests are marked "ready" GitHub recently added support for "draft" pull requests, and this project subsequently began ignoring them upon creation [2]. Complete the implementation of that change by recognizing when "drafts" move to a "ready" state and acting on the pull request. [1] https://github.blog/2019-02-14-introducing-draft-pull-requests/ [2] cd003b22152c06661949292f06270026b78e59d3 --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0709ef4..db1e8eb 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,9 @@ app.post('/github-hook', function (req, res, next) { metadata(n, u, content).then(function(metadata) { return removeReviewableBanner(n, metadata); }); - } else if (action == "opened" || action == "synchronize" || (isComment && action == "created")) { + } else if (action == "opened" || action == "synchronize" || + action == "ready_for_review" || + (isComment && action == "created")) { if (n in currentlyRunning) { logArgs("#" + n + " is already being processed."); return;