fix: remove unused draft param from pull update (#1065)

This commit is contained in:
Peter Evans 2022-02-23 15:34:53 +09:00 committed by GitHub
parent 357cebe268
commit a7bb76508d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 25 deletions

2
dist/index.js vendored
View file

@ -966,7 +966,7 @@ class GitHubHelper {
core.info(`Fetching existing pull request`);
const { data: pulls } = yield this.octokit.rest.pulls.list(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { state: 'open', head: headBranch, base: inputs.base }));
core.info(`Attempting update of pull request`);
const { data: pull } = yield this.octokit.rest.pulls.update(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { pull_number: pulls[0].number, title: inputs.title, body: inputs.body, draft: inputs.draft }));
const { data: pull } = yield this.octokit.rest.pulls.update(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { pull_number: pulls[0].number, title: inputs.title, body: inputs.body }));
core.info(`Updated pull request #${pull.number} (${headBranch} => ${inputs.base})`);
return {
number: pull.number,

44
package-lock.json generated
View file

@ -9,30 +9,30 @@
"version": "3.0.0",
"license": "MIT",
"dependencies": {
"@actions/core": "1.6.0",
"@actions/exec": "1.1.0",
"@octokit/core": "3.5.1",
"@octokit/plugin-paginate-rest": "2.17.0",
"@octokit/plugin-rest-endpoint-methods": "5.13.0",
"https-proxy-agent": "5.0.0",
"uuid": "8.3.2"
"@actions/core": "^1.6.0",
"@actions/exec": "^1.1.0",
"@octokit/core": "^3.5.1",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0",
"https-proxy-agent": "^5.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/jest": "27.0.3",
"@types/node": "16.11.11",
"@typescript-eslint/parser": "5.5.0",
"@vercel/ncc": "0.32.0",
"eslint": "8.3.0",
"eslint-import-resolver-typescript": "2.5.0",
"eslint-plugin-github": "4.3.5",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jest": "25.3.0",
"jest": "27.4.3",
"jest-circus": "27.4.2",
"js-yaml": "4.1.0",
"prettier": "2.5.0",
"ts-jest": "27.0.7",
"typescript": "4.5.2"
"@types/jest": "^27.0.3",
"@types/node": "^16.11.11",
"@typescript-eslint/parser": "^5.5.0",
"@vercel/ncc": "^0.32.0",
"eslint": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-github": "^4.3.5",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
"jest": "^27.4.3",
"jest-circus": "^27.4.2",
"js-yaml": "^4.1.0",
"prettier": "^2.5.0",
"ts-jest": "^27.0.7",
"typescript": "^4.5.2"
}
},
"node_modules/@actions/core": {

View file

@ -84,8 +84,7 @@ export class GitHubHelper {
...this.parseRepository(baseRepository),
pull_number: pulls[0].number,
title: inputs.title,
body: inputs.body,
draft: inputs.draft
body: inputs.body
})
core.info(
`Updated pull request #${pull.number} (${headBranch} => ${inputs.base})`