Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
18f7dc018c | |||
89265e8d24 | |||
a7bb76508d | |||
357cebe268 |
@ -63,7 +63,7 @@ All inputs are **optional**. If not set, sensible defaults will be used.
|
||||
| `reviewers` | A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. | |
|
||||
| `team-reviewers` | A comma or newline-separated list of GitHub teams to request a review from. Note that a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) may be required. See [this issue](https://github.com/peter-evans/create-pull-request/issues/155). If using a GitHub App, refer to [Authenticating with GitHub App generated tokens](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens) for the proper permissions. | |
|
||||
| `milestone` | The number of the milestone to associate this pull request with. | |
|
||||
| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). | `false` |
|
||||
| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It is not possible to change draft status after creation except through the web interface. | `false` |
|
||||
|
||||
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable.
|
||||
```yml
|
||||
|
@ -69,7 +69,7 @@ inputs:
|
||||
milestone:
|
||||
description: 'The number of the milestone to associate the pull request with.'
|
||||
draft:
|
||||
description: 'Create a draft pull request'
|
||||
description: 'Create a draft pull request. It is not possible to change draft status after creation except through the web interface'
|
||||
default: false
|
||||
outputs:
|
||||
pull-request-number:
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -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
44
package-lock.json
generated
@ -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": {
|
||||
|
@ -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})`
|
||||
|
Reference in New Issue
Block a user