mirror of
https://github.com/peter-evans/create-pull-request.git
synced 2026-10-01 09:57:49 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7380612b49 | ||
|
|
771ad1b5f4 | ||
|
|
093c191148 | ||
|
|
00cb0abb4d | ||
|
|
fa0950476f | ||
|
|
b90b9c1e20 | ||
|
|
028a63020c | ||
|
|
9d59234a82 | ||
|
|
210f7aab2c | ||
|
|
6bb7394339 | ||
|
|
a518698c07 | ||
|
|
8be395fdd3 | ||
|
|
36d063872e | ||
|
|
9825ae65b1 | ||
|
|
243251cf92 | ||
|
|
28beef91aa |
@@ -64,6 +64,14 @@ All inputs are **optional**. If not set, sensible defaults will be used.
|
||||
| `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` |
|
||||
|
||||
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable.
|
||||
```yml
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
env:
|
||||
https_proxy: http://<proxy_address>:<port>
|
||||
```
|
||||
|
||||
### Action outputs
|
||||
|
||||
The following outputs can be used by subsequent workflow steps.
|
||||
|
||||
@@ -1740,4 +1740,26 @@ describe('create-or-update-branch tests', () => {
|
||||
])
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
// This failure mode is a limitation of the action. Controlling your own commits cannot be used in detached HEAD state.
|
||||
// https://github.com/peter-evans/create-pull-request/issues/902
|
||||
it('tests failure to create with commits on the working base (during the workflow) in detached HEAD state (WBNR)', async () => {
|
||||
// Checkout the HEAD commit SHA
|
||||
const headSha = await git.revParse('HEAD')
|
||||
await git.checkout(headSha)
|
||||
|
||||
// Create commits on the working base
|
||||
const commits = await createCommits(git)
|
||||
const commitMessage = uuidv4()
|
||||
const result = await createOrUpdateBranch(
|
||||
git,
|
||||
commitMessage,
|
||||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
)
|
||||
// The action cannot successfully create the branch
|
||||
expect(result.action).toEqual('none')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY __test__/entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
EOF
|
||||
|
||||
docker build -t $IMAGE .
|
||||
docker build --no-cache -t $IMAGE .
|
||||
rm Dockerfile
|
||||
fi
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ inputs:
|
||||
outputs:
|
||||
pull-request-number:
|
||||
description: 'The pull request number'
|
||||
pull-request-url:
|
||||
description: 'The URL of the pull request.'
|
||||
pull-request-operation:
|
||||
description: 'The pull request operation performed by the action, `created`, `updated` or `closed`.'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
||||
Vendored
+2337
-329
File diff suppressed because one or more lines are too long
Generated
+5224
-6165
File diff suppressed because it is too large
Load Diff
+18
-17
@@ -29,26 +29,27 @@
|
||||
},
|
||||
"homepage": "https://github.com/peter-evans/create-pull-request",
|
||||
"dependencies": {
|
||||
"@actions/core": "1.2.7",
|
||||
"@actions/exec": "1.0.4",
|
||||
"@octokit/core": "3.4.0",
|
||||
"@octokit/plugin-paginate-rest": "2.13.3",
|
||||
"@octokit/plugin-rest-endpoint-methods": "5.1.1",
|
||||
"@actions/core": "1.4.0",
|
||||
"@actions/exec": "1.1.0",
|
||||
"@octokit/core": "3.5.1",
|
||||
"@octokit/plugin-paginate-rest": "2.14.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "5.5.0",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "26.0.23",
|
||||
"@types/node": "15.0.3",
|
||||
"@typescript-eslint/parser": "4.23.0",
|
||||
"@vercel/ncc": "0.28.5",
|
||||
"eslint": "7.26.0",
|
||||
"eslint-plugin-github": "4.1.3",
|
||||
"eslint-plugin-jest": "24.3.6",
|
||||
"jest": "26.6.3",
|
||||
"jest-circus": "26.6.3",
|
||||
"@types/jest": "26.0.24",
|
||||
"@types/node": "16.4.0",
|
||||
"@typescript-eslint/parser": "4.28.4",
|
||||
"@vercel/ncc": "0.29.0",
|
||||
"eslint": "7.31.0",
|
||||
"eslint-plugin-github": "4.1.5",
|
||||
"eslint-plugin-jest": "24.4.0",
|
||||
"jest": "27.0.6",
|
||||
"jest-circus": "27.0.6",
|
||||
"js-yaml": "4.1.0",
|
||||
"prettier": "2.3.0",
|
||||
"ts-jest": "26.5.6",
|
||||
"typescript": "4.2.4"
|
||||
"prettier": "2.3.2",
|
||||
"ts-jest": "27.0.4",
|
||||
"typescript": "4.3.5"
|
||||
}
|
||||
}
|
||||
|
||||
+17
-1
@@ -1,7 +1,23 @@
|
||||
import {Octokit as Core} from '@octokit/core'
|
||||
import {paginateRest} from '@octokit/plugin-paginate-rest'
|
||||
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
|
||||
import {HttpsProxyAgent} from 'https-proxy-agent'
|
||||
export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods'
|
||||
export {OctokitOptions} from '@octokit/core/dist-types/types'
|
||||
|
||||
export const Octokit = Core.plugin(paginateRest, restEndpointMethods)
|
||||
export const Octokit = Core.plugin(
|
||||
paginateRest,
|
||||
restEndpointMethods,
|
||||
autoProxyAgent
|
||||
)
|
||||
|
||||
// Octokit plugin to support the https_proxy environment variable
|
||||
function autoProxyAgent(octokit: Core) {
|
||||
const proxy = process.env.https_proxy || process.env.HTTPS_PROXY
|
||||
if (!proxy) return
|
||||
|
||||
const agent = new HttpsProxyAgent(proxy)
|
||||
octokit.hook.before('request', options => {
|
||||
options.request.agent = agent
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user