Skip to content

Commit

Permalink
feat: options for draft pull requests (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
lulzneko committed Sep 20, 2021
1 parent 634e065 commit 9556036
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/shipjs-lib/src/lib/config/defaultConfig.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 9556036

Please sign in to comment.