Support creating draft github PRs
Signed-off-by: Simon Gellis <sgellis@attentivemobile.com>
This commit is contained in:
+2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user