From 40ecf667d876e5f78462a2ce3b2d8e35b713bf9d Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sat, 15 Aug 2020 15:30:16 +0200 Subject: [PATCH 1/2] feat: add support for draft PRs --- src/pull-request-handler.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pull-request-handler.ts b/src/pull-request-handler.ts index 99069712d..6adbcb8ee 100644 --- a/src/pull-request-handler.ts +++ b/src/pull-request-handler.ts @@ -236,6 +236,12 @@ export function getPullRequestPlan ( actions: ['merge'] } } + case MergeStateStatus.DRAFT: + return { + code: 'draft', + message: 'Pull request is marked as draft', + actions: [] + } case null: return { code: 'mergeable_not_supplied', From 0615c8fb1ed9b8b3dcf326dfad49f86ffc9981f7 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sat, 15 Aug 2020 17:57:58 +0200 Subject: [PATCH 2/2] update type information --- src/pull-request-handler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pull-request-handler.ts b/src/pull-request-handler.ts index 6adbcb8ee..691be2e6b 100644 --- a/src/pull-request-handler.ts +++ b/src/pull-request-handler.ts @@ -71,6 +71,7 @@ export type PullRequestPlanCode | 'failing_condition' | 'blocked' | 'dirty' + | 'draft' | 'out_of_date' | 'out_of_date_on_fork' | 'update_branch'