Skip to content

Commit

Permalink
Don't try to merge draft PRs (#306)
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin John <[email protected]>
  • Loading branch information
Pandapip1 authored Jul 25, 2023
1 parent b9fba33 commit ab4e24d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab4e24d

Please sign in to comment.