File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 type : string
1414 required : true
1515
16+ create_pr_draft :
17+ description : Whether the format-fixing PR should be opened as a draft
18+ type : boolean
19+ required : false
20+ default : true
21+
1622jobs :
1723 format :
1824 name : Format
@@ -51,17 +57,18 @@ jobs:
5157 uses : Brightspace/third-party-actions@actions/github-script
5258 env :
5359 BRANCH_NAME : ${{ steps.format.outputs.format_branch }}
60+ CREATE_PR_DRAFT : ${{ inputs.create_pr_draft }}
5461 with :
5562 script : |
56- const { BRANCH_NAME } = process.env
63+ const { BRANCH_NAME, CREATE_PR_DRAFT } = process.env
5764 const { data: newPr } = await github.rest.pulls.create({
5865 owner: context.repo.owner,
5966 repo: context.repo.repo,
6067 title: `Auto format #${context.payload.number}`,
6168 body: `Auto format #${context.payload.number}`,
6269 head: BRANCH_NAME,
6370 base: context.payload.pull_request.head.ref,
64- draft: true
71+ draft: CREATE_PR_DRAFT === ' true'
6572 });
6673 await github.rest.issues.createComment({
6774 issue_number: context.issue.number,
You can’t perform that action at this time.
0 commit comments