Compare commits

..

15 commits
v7 ... main

Author SHA1 Message Date
dependabot[bot]
a45d1fb447
build(deps): bump @tootallnate/once and jest-environment-jsdom (#4323)
Some checks are pending
CI / build (push) Waiting to run
CI / test (built) (push) Blocked by required conditions
CI / test (committed) (push) Blocked by required conditions
CI / commentTestSuiteHelp (push) Blocked by required conditions
CI / package (push) Blocked by required conditions
Removes [@tootallnate/once](https://github.com/TooTallNate/once). It's no longer used after updating ancestor dependency [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom). These dependencies need to be updated together.


Removes `@tootallnate/once`

Updates `jest-environment-jsdom` from 29.7.0 to 30.2.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: "@tootallnate/once"
  dependency-version: 
  dependency-type: indirect
- dependency-name: jest-environment-jsdom
  dependency-version: 30.2.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 06:14:22 +00:00
dependabot[bot]
3499eb6183
build(deps): bump the github-actions group with 2 updates (#4316)
Bumps the github-actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

Updates `actions/download-artifact` from 7 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-01 12:34:50 +00:00
dependabot[bot]
3f3b473b8c
build(deps): bump minimatch (#4311)
Bumps  and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together.

Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 06:50:02 +00:00
dependabot[bot]
6699836a21
build(deps-dev): bump the npm group with 2 updates (#4305)
Bumps the npm group with 2 updates: [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) and [prettier](https://github.com/prettier/prettier).


Updates `eslint-plugin-prettier` from 5.5.4 to 5.5.5
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.5.4...v5.5.5)

Updates `prettier` from 3.7.4 to 3.8.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-01 12:35:41 +00:00
Peter Evans
c0f553fe54
feat: add @octokit/plugin-retry to handle retriable server errors (#4298)
Add the retry plugin to automatically retry requests that fail with
server errors (5xx status codes). Configure the plugin to exclude 429
(rate limit) from retries since that is already handled by the
throttling plugin.

- Add @octokit/plugin-retry dependency
- Register retry plugin in Octokit client
- Export retryOptions with doNotRetry list excluding 429
- Apply retryOptions in GitHubHelper constructor
2026-01-21 15:20:27 +00:00
Peter Evans
70001242bf
fix: Handle remote prune failures gracefully (#4295)
Wrap the git remote prune command in a try-catch block to prevent
the action from failing if the prune operation fails. Instead, log
a warning message and allow the action to continue.

Fixes edge cases where the prune command may fail on self-hosted
runners but shouldn't block the pull request creation workflow.
2026-01-21 15:04:51 +00:00
actions-bot
34aa40e9cf
build: update distribution (#4289) 2026-01-15 07:55:19 +00:00
dependabot[bot]
641099ddca
build(deps-dev): bump undici from 6.22.0 to 6.23.0 (#4284)
Bumps [undici](https://github.com/nodejs/undici) from 6.22.0 to 6.23.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.22.0...v6.23.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.23.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-15 00:49:39 +00:00
dependabot[bot]
2271f1ddcf
build(deps-dev): bump the npm group with 2 updates (#4274)
Bumps the npm group with 2 updates: [prettier](https://github.com/prettier/prettier) and [ts-jest](https://github.com/kulshekhar/ts-jest).


Updates `prettier` from 3.7.3 to 3.7.4
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.3...3.7.4)

Updates `ts-jest` from 29.4.5 to 29.4.6
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.4.5...v29.4.6)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.7.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: ts-jest
  dependency-version: 29.4.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-01 12:04:07 +00:00
dependabot[bot]
437c31a11d
build(deps): bump the github-actions group with 2 updates (#4273)
Bumps the github-actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 5 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

Updates `actions/download-artifact` from 6 to 7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-01 12:03:28 +00:00
Peter Evans
0979079bc2
docs: update readme 2025-12-10 07:32:05 +00:00
Andreas Deininger
5b751cdf40
README.md: bump given GitHub actions to their latest versions (#4265)
Co-authored-by: Andreas Deininger <adeininger@urbanonline.de>
2025-12-10 07:30:53 +00:00
Peter Evans
98357b18bf
feat: v8 (#4260) 2025-12-09 20:23:02 +00:00
Copilot
41c0e4b789
Update actions/checkout references to @v6 in docs (#4259)
* Initial plan

* Update actions/checkout references to @v6 in docs

Co-authored-by: peter-evans <18365890+peter-evans@users.noreply.github.com>

* Revert changes to docs/updating.md

Co-authored-by: peter-evans <18365890+peter-evans@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: peter-evans <18365890+peter-evans@users.noreply.github.com>
2025-12-09 11:03:24 +00:00
Yonas Yanfa
994332de4c
chore: Update checkout action version to v6 (#4258) 2025-12-09 10:45:05 +00:00
14 changed files with 1265 additions and 706 deletions

View file

@ -22,18 +22,18 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions/setup-node@v6 - uses: actions/setup-node@v6
with: with:
node-version: 20.x node-version-file: package.json
cache: npm cache: npm
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- run: npm run format-check - run: npm run format-check
- run: npm run lint - run: npm run lint
- run: npm run test - run: npm run test
- uses: actions/upload-artifact@v5 - uses: actions/upload-artifact@v7
with: with:
name: dist name: dist
path: dist path: dist
- uses: actions/upload-artifact@v5 - uses: actions/upload-artifact@v7
with: with:
name: action.yml name: action.yml
path: action.yml path: action.yml
@ -50,12 +50,12 @@ jobs:
with: with:
ref: main ref: main
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v6 uses: actions/download-artifact@v8
with: with:
name: dist name: dist
path: dist path: dist
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v6 uses: actions/download-artifact@v8
with: with:
name: action.yml name: action.yml
path: . path: .
@ -119,12 +119,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions/download-artifact@v6 - uses: actions/download-artifact@v8
with: with:
name: dist name: dist
path: dist path: dist
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
commit-message: 'build: update distribution' commit-message: 'build: update distribution'

View file

@ -11,8 +11,8 @@ on:
type: choice type: choice
description: The major version tag to update description: The major version tag to update
options: options:
- v6
- v7 - v7
- v8
jobs: jobs:
tag: tag:

View file

@ -21,21 +21,21 @@ Create Pull Request action will:
- [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md) - [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md)
- [Examples](docs/examples.md) - [Examples](docs/examples.md)
- [Updating to v7](docs/updating.md) - [Updating between versions](docs/updating.md)
- [Common issues](docs/common-issues.md) - [Common issues](docs/common-issues.md)
## Usage ## Usage
```yml ```yml
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
``` ```
You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v7.x.x` You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v8.x.x`
### Workflow permissions ### Workflow permissions
@ -131,7 +131,7 @@ If you want branches to be deleted immediately on merge then you should use GitH
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable. For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
env: env:
https_proxy: http://<proxy_address>:<port> https_proxy: http://<proxy_address>:<port>
``` ```
@ -153,7 +153,7 @@ Note that in order to read the step outputs the action step must have an id.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
- name: Check outputs - name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }} if: ${{ steps.cpr.outputs.pull-request-number }}
run: | run: |
@ -216,7 +216,7 @@ File changes that do not match one of the paths will be stashed and restored aft
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
add-paths: | add-paths: |
*.java *.java
@ -230,7 +230,7 @@ Note that the repository must be checked out on a branch with a remote, it won't
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Create commits - name: Create commits
run: | run: |
git config user.name 'Peter Evans' git config user.name 'Peter Evans'
@ -243,7 +243,7 @@ Note that the repository must be checked out on a branch with a remote, it won't
- name: Uncommitted change - name: Uncommitted change
run: date +%s > report.txt run: date +%s > report.txt
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
``` ```
### Auto-merge ### Auto-merge
@ -263,14 +263,14 @@ jobs:
createPullRequest: createPullRequest:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Make changes to pull request - name: Make changes to pull request
run: date +%s > report.txt run: date +%s > report.txt
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update report commit-message: Update report

View file

@ -94,7 +94,7 @@ outputs:
pull-request-branch: pull-request-branch:
description: 'The pull request branch name' description: 'The pull request branch name'
runs: runs:
using: 'node20' using: 'node24'
main: 'dist/index.js' main: 'dist/index.js'
branding: branding:
icon: 'git-pull-request' icon: 'git-pull-request'

303
dist/index.js vendored
View file

@ -458,7 +458,12 @@ function createPullRequest(inputs) {
// deleted after being merged or closed. Without this the push using // deleted after being merged or closed. Without this the push using
// '--force-with-lease' fails due to "stale info." // '--force-with-lease' fails due to "stale info."
// https://github.com/peter-evans/create-pull-request/issues/633 // https://github.com/peter-evans/create-pull-request/issues/633
yield git.exec(['remote', 'prune', branchRemoteName]); try {
yield git.exec(['remote', 'prune', branchRemoteName]);
}
catch (error) {
core.warning(`Failed to prune remote '${branchRemoteName}': ${error.message}`);
}
} }
core.endGroup(); core.endGroup();
// Apply the branch suffix if set // Apply the branch suffix if set
@ -1390,6 +1395,7 @@ class GitHubHelper {
options.baseUrl = 'https://api.github.com'; options.baseUrl = 'https://api.github.com';
} }
options.throttle = octokit_client_1.throttleOptions; options.throttle = octokit_client_1.throttleOptions;
options.retry = octokit_client_1.retryOptions;
this.octokit = new octokit_client_1.Octokit(options); this.octokit = new octokit_client_1.Octokit(options);
} }
parseRepository(repository) { parseRepository(repository) {
@ -1819,14 +1825,15 @@ var __importStar = (this && this.__importStar) || (function () {
}; };
})(); })();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.throttleOptions = exports.Octokit = void 0; exports.retryOptions = exports.throttleOptions = exports.Octokit = void 0;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const core_1 = __nccwpck_require__(767); const core_1 = __nccwpck_require__(708);
const plugin_paginate_rest_1 = __nccwpck_require__(3779); const plugin_paginate_rest_1 = __nccwpck_require__(3779);
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(9210); const plugin_rest_endpoint_methods_1 = __nccwpck_require__(9210);
const plugin_retry_1 = __nccwpck_require__(9735);
const plugin_throttling_1 = __nccwpck_require__(6856); const plugin_throttling_1 = __nccwpck_require__(6856);
const proxy_1 = __nccwpck_require__(3459); const proxy_1 = __nccwpck_require__(3459);
exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_throttling_1.throttling, autoProxyAgent); exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_retry_1.retry, plugin_throttling_1.throttling, autoProxyAgent);
exports.throttleOptions = { exports.throttleOptions = {
onRateLimit: (retryAfter, options, _, retryCount) => { onRateLimit: (retryAfter, options, _, retryCount) => {
core.debug(`Hit rate limit for request ${options.method} ${options.url}`); core.debug(`Hit rate limit for request ${options.method} ${options.url}`);
@ -1841,6 +1848,10 @@ exports.throttleOptions = {
core.warning(`Requests may be retried after ${retryAfter} seconds.`); core.warning(`Requests may be retried after ${retryAfter} seconds.`);
} }
}; };
exports.retryOptions = {
// 429 is handled by the throttling plugin, so we exclude it from retry
doNotRetry: [400, 401, 403, 404, 410, 422, 429, 451]
};
// Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy // Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy
function autoProxyAgent(octokit) { function autoProxyAgent(octokit) {
octokit.hook.before('request', options => { octokit.hook.before('request', options => {
@ -4511,7 +4522,7 @@ class HttpClient {
} }
const usingSsl = parsedUrl.protocol === 'https:'; const usingSsl = parsedUrl.protocol === 'https:';
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
token: `${proxyUrl.username}:${proxyUrl.password}` token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
}))); })));
this._proxyAgentDispatcher = proxyAgent; this._proxyAgentDispatcher = proxyAgent;
if (usingSsl && this._ignoreSslError) { if (usingSsl && this._ignoreSslError) {
@ -4625,11 +4636,11 @@ function getProxyUrl(reqUrl) {
})(); })();
if (proxyVar) { if (proxyVar) {
try { try {
return new URL(proxyVar); return new DecodedURL(proxyVar);
} }
catch (_a) { catch (_a) {
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
return new URL(`http://${proxyVar}`); return new DecodedURL(`http://${proxyVar}`);
} }
} }
else { else {
@ -4688,6 +4699,19 @@ function isLoopbackAddress(host) {
hostLower.startsWith('[::1]') || hostLower.startsWith('[::1]') ||
hostLower.startsWith('[0:0:0:0:0:0:0:1]')); hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
} }
class DecodedURL extends URL {
constructor(url, base) {
super(url, base);
this._decodedUsername = decodeURIComponent(super.username);
this._decodedPassword = decodeURIComponent(super.password);
}
get username() {
return this._decodedUsername;
}
get password() {
return this._decodedPassword;
}
}
//# sourceMappingURL=proxy.js.map //# sourceMappingURL=proxy.js.map
/***/ }), /***/ }),
@ -10020,7 +10044,7 @@ module.exports = {
const { parseSetCookie } = __nccwpck_require__(7803) const { parseSetCookie } = __nccwpck_require__(7803)
const { stringify, getHeadersList } = __nccwpck_require__(6338) const { stringify } = __nccwpck_require__(6338)
const { webidl } = __nccwpck_require__(8134) const { webidl } = __nccwpck_require__(8134)
const { Headers } = __nccwpck_require__(9061) const { Headers } = __nccwpck_require__(9061)
@ -10096,14 +10120,13 @@ function getSetCookies (headers) {
webidl.brandCheck(headers, Headers, { strict: false }) webidl.brandCheck(headers, Headers, { strict: false })
const cookies = getHeadersList(headers).cookies const cookies = headers.getSetCookie()
if (!cookies) { if (!cookies) {
return [] return []
} }
// In older versions of undici, cookies is a list of name:value. return cookies.map((pair) => parseSetCookie(pair))
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
} }
/** /**
@ -10531,14 +10554,15 @@ module.exports = {
/***/ }), /***/ }),
/***/ 6338: /***/ 6338:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /***/ ((module) => {
"use strict"; "use strict";
const assert = __nccwpck_require__(2613) /**
const { kHeadersList } = __nccwpck_require__(9411) * @param {string} value
* @returns {boolean}
*/
function isCTLExcludingHtab (value) { function isCTLExcludingHtab (value) {
if (value.length === 0) { if (value.length === 0) {
return false return false
@ -10799,31 +10823,13 @@ function stringify (cookie) {
return out.join('; ') return out.join('; ')
} }
let kHeadersListNode
function getHeadersList (headers) {
if (headers[kHeadersList]) {
return headers[kHeadersList]
}
if (!kHeadersListNode) {
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
(symbol) => symbol.description === 'headers list'
)
assert(kHeadersListNode, 'Headers cannot be parsed')
}
const headersList = headers[kHeadersListNode]
assert(headersList)
return headersList
}
module.exports = { module.exports = {
isCTLExcludingHtab, isCTLExcludingHtab,
stringify, validateCookieName,
getHeadersList validateCookiePath,
validateCookieValue,
toIMFDate,
stringify
} }
@ -12752,6 +12758,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253)
const { File: UndiciFile } = __nccwpck_require__(3305) const { File: UndiciFile } = __nccwpck_require__(3305)
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4346) const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4346)
let random
try {
const crypto = __nccwpck_require__(7598)
random = (max) => crypto.randomInt(0, max)
} catch {
random = (max) => Math.floor(Math.random(max))
}
let ReadableStream = globalThis.ReadableStream let ReadableStream = globalThis.ReadableStream
/** @type {globalThis['File']} */ /** @type {globalThis['File']} */
@ -12837,7 +12851,7 @@ function extractBody (object, keepalive = false) {
// Set source to a copy of the bytes held by object. // Set source to a copy of the bytes held by object.
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
} else if (util.isFormDataLike(object)) { } else if (util.isFormDataLike(object)) {
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
const prefix = `--${boundary}\r\nContent-Disposition: form-data` const prefix = `--${boundary}\r\nContent-Disposition: form-data`
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@ -14819,6 +14833,7 @@ const {
isValidHeaderName, isValidHeaderName,
isValidHeaderValue isValidHeaderValue
} = __nccwpck_require__(555) } = __nccwpck_require__(555)
const util = __nccwpck_require__(9023)
const { webidl } = __nccwpck_require__(8134) const { webidl } = __nccwpck_require__(8134)
const assert = __nccwpck_require__(2613) const assert = __nccwpck_require__(2613)
@ -15372,6 +15387,9 @@ Object.defineProperties(Headers.prototype, {
[Symbol.toStringTag]: { [Symbol.toStringTag]: {
value: 'Headers', value: 'Headers',
configurable: true configurable: true
},
[util.inspect.custom]: {
enumerable: false
} }
}) })
@ -24548,6 +24566,20 @@ class Pool extends PoolBase {
? { ...options.interceptors } ? { ...options.interceptors }
: undefined : undefined
this[kFactory] = factory this[kFactory] = factory
this.on('connectionError', (origin, targets, error) => {
// If a connection error occurs, we remove the client from the pool,
// and emit a connectionError event. They will not be re-used.
// Fixes https://github.com/nodejs/undici/issues/3895
for (const target of targets) {
// Do not use kRemoveClient here, as it will close the client,
// but the client cannot be closed in this state.
const idx = this[kClients].indexOf(target)
if (idx !== -1) {
this[kClients].splice(idx, 1)
}
}
})
} }
[kGetDispatcher] () { [kGetDispatcher] () {
@ -32195,7 +32227,7 @@ module.exports = fetch;
/***/ }), /***/ }),
/***/ 767: /***/ 708:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
"use strict"; "use strict";
@ -32715,46 +32747,8 @@ var endpoint = withDefaults(null, DEFAULTS);
// EXTERNAL MODULE: ./node_modules/fast-content-type-parse/index.js // EXTERNAL MODULE: ./node_modules/fast-content-type-parse/index.js
var fast_content_type_parse = __nccwpck_require__(8739); var fast_content_type_parse = __nccwpck_require__(8739);
;// CONCATENATED MODULE: ./node_modules/@octokit/request-error/dist-src/index.js // EXTERNAL MODULE: ./node_modules/@octokit/request-error/dist-src/index.js
class RequestError extends Error { var dist_src = __nccwpck_require__(1015);
name;
/**
* http status code
*/
status;
/**
* Request options that lead to the error.
*/
request;
/**
* Response object if a response was received
*/
response;
constructor(message, statusCode, options) {
super(message);
this.name = "HttpError";
this.status = Number.parseInt(statusCode);
if (Number.isNaN(this.status)) {
this.status = 0;
}
if ("response" in options) {
this.response = options.response;
}
const requestCopy = Object.assign({}, options.request);
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/(?<! ) .*$/,
" [REDACTED]"
)
});
}
requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
this.request = requestCopy;
}
}
;// CONCATENATED MODULE: ./node_modules/@octokit/request/dist-bundle/index.js ;// CONCATENATED MODULE: ./node_modules/@octokit/request/dist-bundle/index.js
// pkg/dist-src/index.js // pkg/dist-src/index.js
@ -32831,7 +32825,7 @@ async function fetchWrapper(requestOptions) {
} }
} }
} }
const requestError = new RequestError(message, 500, { const requestError = new dist_src/* RequestError */.G(message, 500, {
request: requestOptions request: requestOptions
}); });
requestError.cause = error; requestError.cause = error;
@ -32863,21 +32857,21 @@ async function fetchWrapper(requestOptions) {
if (status < 400) { if (status < 400) {
return octokitResponse; return octokitResponse;
} }
throw new RequestError(fetchResponse.statusText, status, { throw new dist_src/* RequestError */.G(fetchResponse.statusText, status, {
response: octokitResponse, response: octokitResponse,
request: requestOptions request: requestOptions
}); });
} }
if (status === 304) { if (status === 304) {
octokitResponse.data = await getResponseData(fetchResponse); octokitResponse.data = await getResponseData(fetchResponse);
throw new RequestError("Not modified", status, { throw new dist_src/* RequestError */.G("Not modified", status, {
response: octokitResponse, response: octokitResponse,
request: requestOptions request: requestOptions
}); });
} }
if (status >= 400) { if (status >= 400) {
octokitResponse.data = await getResponseData(fetchResponse); octokitResponse.data = await getResponseData(fetchResponse);
throw new RequestError(toErrorMessage(octokitResponse.data), status, { throw new dist_src/* RequestError */.G(toErrorMessage(octokitResponse.data), status, {
response: octokitResponse, response: octokitResponse,
request: requestOptions request: requestOptions
}); });
@ -36174,6 +36168,98 @@ legacyRestEndpointMethods.VERSION = VERSION;
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map
/***/ }),
/***/ 9735:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
"use strict";
__nccwpck_require__.r(__webpack_exports__);
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
/* harmony export */ VERSION: () => (/* binding */ VERSION),
/* harmony export */ retry: () => (/* binding */ retry)
/* harmony export */ });
/* harmony import */ var bottleneck_light_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3251);
/* harmony import */ var _octokit_request_error__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(1015);
// pkg/dist-src/version.js
var VERSION = "0.0.0-development";
// pkg/dist-src/error-request.js
async function errorRequest(state, octokit, error, options) {
if (!error.request || !error.request.request) {
throw error;
}
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
const retries = options.request.retries != null ? options.request.retries : state.retries;
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
throw octokit.retry.retryRequest(error, retries, retryAfter);
}
throw error;
}
// pkg/dist-src/wrap-request.js
async function wrapRequest(state, octokit, request, options) {
const limiter = new bottleneck_light_js__WEBPACK_IMPORTED_MODULE_0__();
limiter.on("failed", function(error, info) {
const maxRetries = ~~error.request.request.retries;
const after = ~~error.request.request.retryAfter;
options.request.retryCount = info.retryCount + 1;
if (maxRetries > info.retryCount) {
return after * state.retryAfterBaseValue;
}
});
return limiter.schedule(
requestWithGraphqlErrorHandling.bind(null, state, octokit, request),
options
);
}
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
const response = await request(request, options);
if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test(
response.data.errors[0].message
)) {
const error = new _octokit_request_error__WEBPACK_IMPORTED_MODULE_1__/* .RequestError */ .G(response.data.errors[0].message, 500, {
request: options,
response
});
return errorRequest(state, octokit, error, options);
}
return response;
}
// pkg/dist-src/index.js
function retry(octokit, octokitOptions) {
const state = Object.assign(
{
enabled: true,
retryAfterBaseValue: 1e3,
doNotRetry: [400, 401, 403, 404, 410, 422, 451],
retries: 3
},
octokitOptions.retry
);
if (state.enabled) {
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
}
return {
retry: {
retryRequest: (error, retries, retryAfter) => {
error.request.request = Object.assign({}, error.request.request, {
retries,
retryAfter
});
return error;
}
}
};
}
retry.VERSION = VERSION;
/***/ }), /***/ }),
/***/ 6856: /***/ 6856:
@ -36413,6 +36499,55 @@ throttling.triggersNotification = triggersNotification;
/***/ }),
/***/ 1015:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
"use strict";
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
/* harmony export */ G: () => (/* binding */ RequestError)
/* harmony export */ });
class RequestError extends Error {
name;
/**
* http status code
*/
status;
/**
* Request options that lead to the error.
*/
request;
/**
* Response object if a response was received
*/
response;
constructor(message, statusCode, options) {
super(message);
this.name = "HttpError";
this.status = Number.parseInt(statusCode);
if (Number.isNaN(this.status)) {
this.status = 0;
}
if ("response" in options) {
this.response = options.response;
}
const requestCopy = Object.assign({}, options.request);
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/(?<! ) .*$/,
" [REDACTED]"
)
});
}
requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
this.request = requestCopy;
}
}
/***/ }), /***/ }),
/***/ 7989: /***/ 7989:

View file

@ -37,7 +37,7 @@ So the straightforward solution is to just not install them during the workflow
- If hooks are automatically enabled by a framework, use an option provided by the framework to disable them. For example, for Husky users, they can be disabled with the `--ignore-scripts` flag, or by setting the `HUSKY` environment variable when the action runs. - If hooks are automatically enabled by a framework, use an option provided by the framework to disable them. For example, for Husky users, they can be disabled with the `--ignore-scripts` flag, or by setting the `HUSKY` environment variable when the action runs.
```yml ```yml
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
env: env:
HUSKY: '0' HUSKY: '0'
``` ```

View file

@ -40,7 +40,7 @@ For each [event type](https://docs.github.com/en/actions/reference/events-that-t
The default can be overridden by specifying a `ref` on checkout. The default can be overridden by specifying a `ref` on checkout.
```yml ```yml
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
ref: develop ref: develop
``` ```
@ -77,7 +77,7 @@ jobs:
example: example:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
``` ```
There may be use cases where it makes sense to execute the workflow on a branch that is not the base of the pull request. In these cases, the base branch can be specified with the `base` action input. The action will attempt to rebase changes made during the workflow on to the actual base. There may be use cases where it makes sense to execute the workflow on a branch that is not the base of the pull request. In these cases, the base branch can be specified with the `base` action input. The action will attempt to rebase changes made during the workflow on to the actual base.
@ -92,7 +92,7 @@ In these cases, you *must supply* the `base` input so the action can rebase chan
Workflows triggered by [`pull_request`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request) events will by default check out a merge commit. Set the `base` input as follows to base the new pull request on the current pull request's branch. Workflows triggered by [`pull_request`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request) events will by default check out a merge commit. Set the `base` input as follows to base the new pull request on the current pull request's branch.
```yml ```yml
- uses: peter-evans/create-pull-request@v7 - uses: peter-evans/create-pull-request@v8
with: with:
base: ${{ github.head_ref }} base: ${{ github.head_ref }}
``` ```
@ -100,7 +100,7 @@ Workflows triggered by [`pull_request`](https://docs.github.com/en/actions/refer
Workflows triggered by [`release`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release) events will by default check out a tag. For most use cases, you will need to set the `base` input to the branch name of the tagged commit. Workflows triggered by [`release`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release) events will by default check out a tag. For most use cases, you will need to set the `base` input to the branch name of the tagged commit.
```yml ```yml
- uses: peter-evans/create-pull-request@v7 - uses: peter-evans/create-pull-request@v8
with: with:
base: main base: main
``` ```
@ -179,14 +179,14 @@ This action uses [ncc](https://github.com/vercel/ncc) to compile the Node.js cod
Checking out a branch from a different repository from where the workflow is executing will make *that repository* the target for the created pull request. In this case, the `GITHUB_TOKEN` will not work and one of the other [token options](../README.md#token) must be used. Checking out a branch from a different repository from where the workflow is executing will make *that repository* the target for the created pull request. In this case, the `GITHUB_TOKEN` will not work and one of the other [token options](../README.md#token) must be used.
```yml ```yml
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
repository: owner/repo repository: owner/repo
# Make changes to pull request here # Make changes to pull request here
- uses: peter-evans/create-pull-request@v7 - uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
``` ```
@ -210,14 +210,14 @@ How to use SSH (deploy keys) with create-pull-request action:
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
``` ```
### Push pull request branches to a fork ### Push pull request branches to a fork
@ -238,11 +238,11 @@ It will use their own fork to push code and create the pull request.
6. As shown in the following example workflow, set the `push-to-fork` input to the full repository name of the fork. 6. As shown in the following example workflow, set the `push-to-fork` input to the full repository name of the fork.
```yaml ```yaml
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- uses: peter-evans/create-pull-request@v7 - uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.MACHINE_USER_PAT }} token: ${{ secrets.MACHINE_USER_PAT }}
push-to-fork: machine-user/fork-of-repository push-to-fork: machine-user/fork-of-repository
@ -280,12 +280,12 @@ The following is an example of pushing to a fork using GitHub App tokens.
owner: owner owner: owner
repositories: fork-of-repo repositories: fork-of-repo
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
branch-token: ${{ steps.generate-token.outputs.token }} branch-token: ${{ steps.generate-token.outputs.token }}
push-to-fork: owner/fork-of-repo push-to-fork: owner/fork-of-repo
@ -325,12 +325,12 @@ GitHub App generated tokens can be configured with fine-grained permissions and
app-id: ${{ secrets.APP_ID }} app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }} private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
``` ```
@ -350,7 +350,7 @@ In the following example, a pull request is being created in remote repo `owner/
owner: owner owner: owner
repositories: repo repositories: repo
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
token: ${{ steps.generate-token.outputs.token }} # necessary if the repo is private token: ${{ steps.generate-token.outputs.token }} # necessary if the repo is private
repository: owner/repo repository: owner/repo
@ -358,7 +358,7 @@ In the following example, a pull request is being created in remote repo `owner/
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
``` ```
@ -382,12 +382,12 @@ The action can sign commits as `github-actions[bot]` when using the repository's
In this example the `token` input is not supplied, so the action will use the repository's default `GITHUB_TOKEN`. This will sign commits as `github-actions[bot]`. In this example the `token` input is not supplied, so the action will use the repository's default `GITHUB_TOKEN`. This will sign commits as `github-actions[bot]`.
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
sign-commits: true sign-commits: true
``` ```
@ -395,7 +395,7 @@ In this example the `token` input is not supplied, so the action will use the re
In this example, the `token` input is generated using a GitHub App. This will sign commits as `<application-name>[bot]`. In this example, the `token` input is generated using a GitHub App. This will sign commits as `<application-name>[bot]`.
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v2
id: generate-token id: generate-token
@ -406,7 +406,7 @@ In this example, the `token` input is generated using a GitHub App. This will si
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
sign-commits: true sign-commits: true
@ -437,7 +437,7 @@ The action can use GPG to sign commits with a GPG key that you generate yourself
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: crazy-max/ghaction-import-gpg@v5 - uses: crazy-max/ghaction-import-gpg@v5
with: with:
@ -449,7 +449,7 @@ The action can use GPG to sign commits with a GPG key that you generate yourself
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
committer: example <email@example.com> committer: example <email@example.com>
@ -474,12 +474,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: apk --no-cache add git run: apk --no-cache add git
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
``` ```
**Ubuntu container example:** **Ubuntu container example:**
@ -497,10 +497,10 @@ jobs:
add-apt-repository -y ppa:git-core/ppa add-apt-repository -y ppa:git-core/ppa
apt-get install -y git apt-get install -y git
- uses: actions/checkout@v4 - uses: actions/checkout@v6
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
``` ```

View file

@ -42,14 +42,14 @@ jobs:
updateAuthors: updateAuthors:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Update AUTHORS - name: Update AUTHORS
run: | run: |
git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
commit-message: update authors commit-message: update authors
title: Update AUTHORS title: Update AUTHORS
@ -73,7 +73,7 @@ jobs:
productionPromotion: productionPromotion:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
ref: production ref: production
- name: Reset promotion branch - name: Reset promotion branch
@ -81,7 +81,7 @@ jobs:
git fetch origin main:main git fetch origin main:main
git reset --hard main git reset --hard main
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
branch: production-promotion branch: production-promotion
``` ```
@ -106,7 +106,7 @@ jobs:
updateChangelog: updateChangelog:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Update Changelog - name: Update Changelog
@ -116,7 +116,7 @@ jobs:
./git-chglog -o CHANGELOG.md ./git-chglog -o CHANGELOG.md
rm git-chglog rm git-chglog
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
commit-message: update changelog commit-message: update changelog
title: Update Changelog title: Update Changelog
@ -144,7 +144,7 @@ jobs:
update-dep: update-dep:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16.x' node-version: '16.x'
@ -153,7 +153,7 @@ jobs:
npx -p npm-check-updates ncu -u npx -p npm-check-updates ncu -u
npm install npm install
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update dependencies commit-message: Update dependencies
@ -180,7 +180,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 16.x node-version: 16.x
@ -204,7 +204,7 @@ jobs:
update-dep: update-dep:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-java@v2 - uses: actions/setup-java@v2
with: with:
distribution: 'temurin' distribution: 'temurin'
@ -214,7 +214,7 @@ jobs:
- name: Perform dependency resolution and write new lockfiles - name: Perform dependency resolution and write new lockfiles
run: ./gradlew dependencies --write-locks run: ./gradlew dependencies --write-locks
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update dependencies commit-message: Update dependencies
@ -242,14 +242,14 @@ jobs:
update-dep: update-dep:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Update dependencies - name: Update dependencies
run: | run: |
cargo install cargo-edit cargo install cargo-edit
cargo update cargo update
cargo upgrade --to-lockfile cargo upgrade --to-lockfile
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update dependencies commit-message: Update dependencies
@ -277,7 +277,7 @@ jobs:
updateSwagger: updateSwagger:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Get Latest Swagger UI Release - name: Get Latest Swagger UI Release
id: swagger-ui id: swagger-ui
run: | run: |
@ -307,7 +307,7 @@ jobs:
# Update current release # Update current release
echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }} commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }}
title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }} title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }}
@ -342,7 +342,7 @@ jobs:
updateFork: updateFork:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
repository: fork-owner/repo repository: fork-owner/repo
- name: Reset the default branch with upstream changes - name: Reset the default branch with upstream changes
@ -351,7 +351,7 @@ jobs:
git fetch upstream main:upstream-main git fetch upstream main:upstream-main
git reset --hard upstream-main git reset --hard upstream-main
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
branch: upstream-changes branch: upstream-changes
@ -370,7 +370,7 @@ jobs:
format: format:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Download website - name: Download website
run: | run: |
wget \ wget \
@ -384,7 +384,7 @@ jobs:
--domains quotes.toscrape.com \ --domains quotes.toscrape.com \
http://quotes.toscrape.com/ http://quotes.toscrape.com/
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
commit-message: update local website copy commit-message: update local website copy
title: Automated Updates to Local Website Copy title: Automated Updates to Local Website Copy
@ -466,7 +466,7 @@ jobs:
if: startsWith(github.head_ref, 'autopep8-patches') == false && github.event.pull_request.head.repo.full_name == github.repository if: startsWith(github.head_ref, 'autopep8-patches') == false && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: autopep8 - name: autopep8
@ -481,7 +481,7 @@ jobs:
echo "branch-name=$branch-name" >> $GITHUB_OUTPUT echo "branch-name=$branch-name" >> $GITHUB_OUTPUT
- name: Create Pull Request - name: Create Pull Request
if: steps.autopep8.outputs.exit-code == 2 if: steps.autopep8.outputs.exit-code == 2
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
commit-message: autopep8 action fixes commit-message: autopep8 action fixes
title: Fixes by autopep8 action title: Fixes by autopep8 action
@ -515,13 +515,13 @@ jobs:
if: startsWith(github.ref, 'refs/heads/') if: startsWith(github.ref, 'refs/heads/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
... ...
someOtherJob: someOtherJob:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
... ...
``` ```
@ -540,7 +540,7 @@ Note that the step where output variables are defined must have an id.
echo "pr_title=$pr_title" >> $GITHUB_OUTPUT echo "pr_title=$pr_title" >> $GITHUB_OUTPUT
echo "pr_body=$pr_body" >> $GITHUB_OUTPUT echo "pr_body=$pr_body" >> $GITHUB_OUTPUT
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
title: ${{ steps.vars.outputs.pr_title }} title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }} body: ${{ steps.vars.outputs.pr_body }}
@ -566,7 +566,7 @@ The template is rendered using the [render-template](https://github.com/chuhlomi
bar: that bar: that
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
with: with:
body: ${{ steps.template.outputs.result }} body: ${{ steps.template.outputs.result }}
``` ```
@ -622,7 +622,7 @@ For example:
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v8
- name: Show message for created Pull Request - name: Show message for created Pull Request
if: ${{ steps.cpr.outputs.pull-request-url && steps.cpr.outputs.pull-request-operation != 'none' }} if: ${{ steps.cpr.outputs.pull-request-url && steps.cpr.outputs.pull-request-operation != 'none' }}

View file

@ -1,3 +1,14 @@
## Updating from `v7` to `v8`
### Behaviour changes
- If using self-hosted runners or GitHub Enterprise Server, there are minimum requirements for `v8` to run. See "What's new" below for details.
### What's new
- Updated runtime to Node.js 24
- The action now requires a minimum version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) for the Actions runner. Update self-hosted runners to v2.327.1 or later to ensure compatibility.
## Updating from `v6` to `v7` ## Updating from `v6` to `v7`
### Behaviour changes ### Behaviour changes

1472
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,12 @@
{ {
"name": "create-pull-request", "name": "create-pull-request",
"version": "7.0.0", "version": "8.0.0",
"private": true, "private": true,
"description": "Creates a pull request for changes to your repository in the actions workspace", "description": "Creates a pull request for changes to your repository in the actions workspace",
"main": "lib/main.js", "main": "lib/main.js",
"engines": {
"node": ">=24.4.0"
},
"scripts": { "scripts": {
"build": "tsc && ncc build", "build": "tsc && ncc build",
"format": "prettier --write '**/*.ts'", "format": "prettier --write '**/*.ts'",
@ -34,6 +37,7 @@
"@octokit/core": "^6.1.6", "@octokit/core": "^6.1.6",
"@octokit/plugin-paginate-rest": "^11.6.0", "@octokit/plugin-paginate-rest": "^11.6.0",
"@octokit/plugin-rest-endpoint-methods": "^13.5.0", "@octokit/plugin-rest-endpoint-methods": "^13.5.0",
"@octokit/plugin-retry": "^7.2.1",
"@octokit/plugin-throttling": "^9.6.1", "@octokit/plugin-throttling": "^9.6.1",
"node-fetch-native": "^1.6.7", "node-fetch-native": "^1.6.7",
"p-limit": "^6.2.0", "p-limit": "^6.2.0",
@ -50,14 +54,14 @@
"eslint-plugin-github": "^4.10.2", "eslint-plugin-github": "^4.10.2",
"eslint-plugin-import": "^2.32.0", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^27.9.0", "eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^5.5.4", "eslint-plugin-prettier": "^5.5.5",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"jest-environment-jsdom": "^29.7.0", "jest-environment-jsdom": "^30.2.0",
"js-yaml": "^4.1.1", "js-yaml": "^4.1.1",
"prettier": "^3.7.3", "prettier": "^3.8.1",
"ts-jest": "^29.4.5", "ts-jest": "^29.4.6",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"undici": "^6.22.0" "undici": "^6.23.0"
} }
} }

View file

@ -127,7 +127,13 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
// deleted after being merged or closed. Without this the push using // deleted after being merged or closed. Without this the push using
// '--force-with-lease' fails due to "stale info." // '--force-with-lease' fails due to "stale info."
// https://github.com/peter-evans/create-pull-request/issues/633 // https://github.com/peter-evans/create-pull-request/issues/633
await git.exec(['remote', 'prune', branchRemoteName]) try {
await git.exec(['remote', 'prune', branchRemoteName])
} catch (error) {
core.warning(
`Failed to prune remote '${branchRemoteName}': ${(error as Error).message}`
)
}
} }
core.endGroup() core.endGroup()

View file

@ -1,7 +1,12 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import {Inputs} from './create-pull-request' import {Inputs} from './create-pull-request'
import {Commit, GitCommandManager} from './git-command-manager' import {Commit, GitCommandManager} from './git-command-manager'
import {Octokit, OctokitOptions, throttleOptions} from './octokit-client' import {
Octokit,
OctokitOptions,
retryOptions,
throttleOptions
} from './octokit-client'
import pLimit from 'p-limit' import pLimit from 'p-limit'
import * as utils from './utils' import * as utils from './utils'
@ -52,6 +57,7 @@ export class GitHubHelper {
options.baseUrl = 'https://api.github.com' options.baseUrl = 'https://api.github.com'
} }
options.throttle = throttleOptions options.throttle = throttleOptions
options.retry = retryOptions
this.octokit = new Octokit(options) this.octokit = new Octokit(options)
} }

View file

@ -2,6 +2,7 @@ import * as core from '@actions/core'
import {Octokit as OctokitCore} from '@octokit/core' import {Octokit as OctokitCore} from '@octokit/core'
import {paginateRest} from '@octokit/plugin-paginate-rest' import {paginateRest} from '@octokit/plugin-paginate-rest'
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods' import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
import {retry} from '@octokit/plugin-retry'
import {throttling} from '@octokit/plugin-throttling' import {throttling} from '@octokit/plugin-throttling'
import {fetch} from 'node-fetch-native/proxy' import {fetch} from 'node-fetch-native/proxy'
export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods' export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods'
@ -11,6 +12,7 @@ export {OctokitOptions} from '@octokit/core/dist-types/types'
export const Octokit = OctokitCore.plugin( export const Octokit = OctokitCore.plugin(
paginateRest, paginateRest,
restEndpointMethods, restEndpointMethods,
retry,
throttling, throttling,
autoProxyAgent autoProxyAgent
) )
@ -32,6 +34,11 @@ export const throttleOptions = {
} }
} }
export const retryOptions = {
// 429 is handled by the throttling plugin, so we exclude it from retry
doNotRetry: [400, 401, 403, 404, 410, 422, 429, 451]
}
// Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy // Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy
function autoProxyAgent(octokit: OctokitCore) { function autoProxyAgent(octokit: OctokitCore) {
octokit.hook.before('request', options => { octokit.hook.before('request', options => {