From ab4e24d7d8fe251d2ebe03966df24c19d9ef9d80 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Tue, 25 Jul 2023 10:42:47 -0500 Subject: [PATCH] Don't try to merge draft PRs (#306) Signed-off-by: Gavin John --- src/merge.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/merge.ts b/src/merge.ts index f7c9bf9..fcfd358 100644 --- a/src/merge.ts +++ b/src/merge.ts @@ -264,6 +264,9 @@ export async function performMergeAction(octokit: Octokit, _: Config, repository // Make pre-merge changes await preMergeChanges(octokit, _, repository, pull_number, files, true); + // If draft PR, return + if (pull_request.draft) return; + // Enable auto merge // Need to use GraphQL API to enable auto merge // https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge