Support creating draft github PRs

Signed-off-by: Simon Gellis <sgellis@attentivemobile.com>
This commit is contained in:
Simon Gellis
2022-03-23 17:45:53 -04:00
parent 4431873583
commit aabd601b11
2 changed files with 10 additions and 0 deletions
@@ -85,6 +85,7 @@ describe('createPublishGithubPullRequestAction', () => {
title: 'Create my new app',
branchName: 'new-app',
description: 'This PR is really good',
draft: true,
};
mockFs({
@@ -109,6 +110,7 @@ describe('createPublishGithubPullRequestAction', () => {
title: 'Create my new app',
head: 'new-app',
body: 'This PR is really good',
draft: true,
changes: [
{
commit: 'Create my new app',
@@ -114,6 +114,7 @@ export const createPublishGithubPullRequestAction = ({
title: string;
branchName: string;
description: string;
draft?: boolean;
repoUrl: string;
targetPath?: string;
sourcePath?: string;
@@ -145,6 +146,11 @@ export const createPublishGithubPullRequestAction = ({
title: 'Pull Request Description',
description: 'The description of the pull request',
},
draft: {
type: 'boolean',
title: 'Create as Draft',
description: 'Create a draft pull request',
},
sourcePath: {
type: 'string',
title: 'Working Subdirectory',
@@ -186,6 +192,7 @@ export const createPublishGithubPullRequestAction = ({
branchName,
title,
description,
draft,
targetPath,
sourcePath,
token: providedToken,
@@ -264,6 +271,7 @@ export const createPublishGithubPullRequestAction = ({
changes,
body: description,
head: branchName,
draft,
});
if (!response) {