Skip to content

Commit

Permalink
fix: remove unused draft param from pull update (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans authored Feb 23, 2022
1 parent 357cebe commit a7bb765
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
44 changes: 22 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/github-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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})`
Expand Down

0 comments on commit a7bb765

Please sign in to comment.