Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: options for draft pull requests #959

Merged
merged 1 commit into from Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/shipjs-lib/src/lib/config/defaultConfig.js
Expand Up @@ -77,6 +77,7 @@ _This pull request is automatically generated by [Ship.js](https://github.com/al
`.trim();
return message;
},
draftPullRequest: false,
pullRequestReviewers: undefined,
pullRequestTeamReviewers: undefined,
shouldRelease: ({
Expand Down
2 changes: 2 additions & 0 deletions packages/shipjs/src/step/prepare/createPullRequest.js
Expand Up @@ -22,6 +22,7 @@ export default async ({
formatPullRequestTitle,
formatPullRequestMessage,
publishCommand,
draftPullRequest,
pullRequestReviewers,
pullRequestTeamReviewers,
remote,
Expand Down Expand Up @@ -73,6 +74,7 @@ export default async ({
body: message,
head: stagingBranch,
base: baseBranch,
draft: draftPullRequest,
});

if (
Expand Down
8 changes: 8 additions & 0 deletions website/reference/all-config.md
Expand Up @@ -178,6 +178,14 @@ beforeCommitChanges: ({ nextVersion, releaseType, exec, dir }) => {

This is a lifecycle hook which is executed right before `git commit` happens. You can put additional code like modifying some other files.

## `draftPullRequest`

_used at_: `shipjs prepare`

_default:_ `false`

If `true`, Ship.js will create a draft pull request.

## `pullRequestReviewers`

_used at_: `shipjs prepare`
Expand Down