From cab99b362baa5afbbd8c7c78234e6b071b80687d Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 11 Aug 2023 00:31:51 +0200 Subject: [PATCH 1/4] fix typo proceeded/processed --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2c2acc3..06c2a472 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ You can find more information about the required permissions under the correspon ## Statefulness If the action ends because of [operations-per-run](#operations-per-run) then the next run will start from the first -unprocessed issue skipping the issues proceeded during the previous run(s). The state is reset when all the issues are -proceeded. This should be considered for scheduling workflow runs. +unprocessed issue skipping the issues processed during the previous run(s). The state is reset when all the issues are +processed. This should be considered for scheduling workflow runs. The saved state lifetime is the same as the [actions cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy) From 8986f6218b4935e254d5b844e8c36b4d953f2643 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Tue, 22 Aug 2023 10:07:11 +0200 Subject: [PATCH 2/4] Don not try to delete cache if it does not exists --- dist/index.js | 7 +++++-- src/classes/state/state-cache-storage.ts | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 343c8313..cfcb005d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1636,7 +1636,7 @@ const resetCacheWithOctokit = (cacheKey) => __awaiter(void 0, void 0, void 0, fu } catch (error) { if (error.status) { - core.debug(`Cache ${cacheKey} does not exist`); + core.warning(`Error delete ${cacheKey}: [${error.status}] ${error.message || 'Unknown reason'}`); } else { throw error; @@ -1650,7 +1650,10 @@ class StateCacheStorage { const filePath = path_1.default.join(tmpDir, STATE_FILE); fs_1.default.writeFileSync(filePath, serializedState); try { - yield resetCacheWithOctokit(CACHE_KEY); + const cacheExists = yield checkIfCacheExists(CACHE_KEY); + if (cacheExists) { + yield resetCacheWithOctokit(CACHE_KEY); + } const fileSize = fs_1.default.statSync(filePath).size; if (fileSize === 0) { core.info(`the state will be removed`); diff --git a/src/classes/state/state-cache-storage.ts b/src/classes/state/state-cache-storage.ts index 848872a3..b30b503b 100644 --- a/src/classes/state/state-cache-storage.ts +++ b/src/classes/state/state-cache-storage.ts @@ -54,7 +54,11 @@ const resetCacheWithOctokit = async (cacheKey: string): Promise => { ); } catch (error) { if (error.status) { - core.debug(`Cache ${cacheKey} does not exist`); + core.warning( + `Error delete ${cacheKey}: [${error.status}] ${ + error.message || 'Unknown reason' + }` + ); } else { throw error; } @@ -67,7 +71,10 @@ export class StateCacheStorage implements IStateStorage { fs.writeFileSync(filePath, serializedState); try { - await resetCacheWithOctokit(CACHE_KEY); + const cacheExists = await checkIfCacheExists(CACHE_KEY); + if (cacheExists) { + await resetCacheWithOctokit(CACHE_KEY); + } const fileSize = fs.statSync(filePath).size; if (fileSize === 0) { From 88a6f4f6cbe6984b66da80d3d448d5f0c4d1a42d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:01:29 +0200 Subject: [PATCH 3/4] build(deps-dev): bump typescript from 5.1.3 to 5.2.2 (#1083) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.2.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.3...v5.2.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b6cfd4f..a84da666 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "standard-version": "^9.3.1", "terminal-link": "^2.1.1", "ts-jest": "^29.0.5", - "typescript": "^5.0.4" + "typescript": "^5.2.2" }, "engines": { "node": "16", @@ -7403,9 +7403,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -13262,9 +13262,9 @@ "dev": true }, "typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index f1f2cf7c..b088df87 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,6 @@ "standard-version": "^9.3.1", "terminal-link": "^2.1.1", "ts-jest": "^29.0.5", - "typescript": "^5.0.4" + "typescript": "^5.2.2" } } From b69b346013879cedbf50c69f572cd85439a41936 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:01:45 +0200 Subject: [PATCH 4/4] build(deps-dev): bump @types/node from 18.16.18 to 20.5.1 (#1079) * build(deps-dev): bump @types/node from 18.16.18 to 20.5.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.18 to 20.5.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Fix @types/node.dep.yml, license --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergey Dolin --- .licenses/npm/@types/node.dep.yml | 2 +- .licenses/npm/ip-regex.dep.yml | 34 ----------------------- .licenses/npm/psl.dep.yml | 43 ------------------------------ .licenses/npm/punycode.dep.yml | 34 ----------------------- .licenses/npm/semver-7.5.3.dep.yml | 26 ------------------ .licenses/npm/tough-cookie.dep.yml | 23 ---------------- package-lock.json | 14 +++++----- package.json | 2 +- 8 files changed, 9 insertions(+), 169 deletions(-) delete mode 100644 .licenses/npm/ip-regex.dep.yml delete mode 100644 .licenses/npm/psl.dep.yml delete mode 100644 .licenses/npm/punycode.dep.yml delete mode 100644 .licenses/npm/semver-7.5.3.dep.yml delete mode 100644 .licenses/npm/tough-cookie.dep.yml diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml index 45e4777c..4203c224 100644 --- a/.licenses/npm/@types/node.dep.yml +++ b/.licenses/npm/@types/node.dep.yml @@ -1,6 +1,6 @@ --- name: "@types/node" -version: 18.16.18 +version: 20.5.1 type: npm summary: TypeScript definitions for Node.js homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node diff --git a/.licenses/npm/ip-regex.dep.yml b/.licenses/npm/ip-regex.dep.yml deleted file mode 100644 index bbca5b69..00000000 --- a/.licenses/npm/ip-regex.dep.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: ip-regex -version: 2.1.0 -type: npm -summary: Regular expression for matching IP addresses (IPv4 & IPv6) -homepage: -license: mit -licenses: -- sources: license - text: | - The MIT License (MIT) - - Copyright (c) Sindre Sorhus (sindresorhus.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: readme.md - text: MIT © [Sindre Sorhus](https://sindresorhus.com) -notices: [] diff --git a/.licenses/npm/psl.dep.yml b/.licenses/npm/psl.dep.yml deleted file mode 100644 index c09a6946..00000000 --- a/.licenses/npm/psl.dep.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: psl -version: 1.9.0 -type: npm -summary: Domain name parser based on the Public Suffix List -homepage: -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2017 Lupo Montero lupomontero@gmail.com - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- sources: README.md - text: |- - The MIT License (MIT) - - Copyright (c) 2017 Lupo Montero - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -notices: [] diff --git a/.licenses/npm/punycode.dep.yml b/.licenses/npm/punycode.dep.yml deleted file mode 100644 index 08baedcd..00000000 --- a/.licenses/npm/punycode.dep.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: punycode -version: 2.3.0 -type: npm -summary: A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, - and works on nearly all JavaScript platforms. -homepage: https://mths.be/punycode -license: mit -licenses: -- sources: LICENSE-MIT.txt - text: | - Copyright Mathias Bynens - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- sources: README.md - text: Punycode.js is available under the [MIT](https://mths.be/mit) license. -notices: [] diff --git a/.licenses/npm/semver-7.5.3.dep.yml b/.licenses/npm/semver-7.5.3.dep.yml deleted file mode 100644 index 5702200a..00000000 --- a/.licenses/npm/semver-7.5.3.dep.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: semver -version: 7.5.3 -type: npm -summary: The semantic version parser used by npm. -homepage: -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -notices: [] diff --git a/.licenses/npm/tough-cookie.dep.yml b/.licenses/npm/tough-cookie.dep.yml deleted file mode 100644 index 1496c109..00000000 --- a/.licenses/npm/tough-cookie.dep.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: tough-cookie -version: 3.0.1 -type: npm -summary: RFC6265 Cookies and Cookie Jar for node.js -homepage: https://github.com/salesforce/tough-cookie -license: bsd-3-clause -licenses: -- sources: LICENSE - text: | - Copyright (c) 2015, Salesforce.com, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -notices: [] diff --git a/package-lock.json b/package-lock.json index a84da666..93cc0c45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "devDependencies": { "@types/jest": "^29.5.3", "@types/lodash.deburr": "^4.1.6", - "@types/node": "^18.15.11", + "@types/node": "^20.5.1", "@types/semver": "^7.5.0", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1", @@ -1872,9 +1872,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.16.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", - "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==" + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==" }, "node_modules/@types/node-fetch": { "version": "2.6.4", @@ -9226,9 +9226,9 @@ "dev": true }, "@types/node": { - "version": "18.16.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", - "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==" + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==" }, "@types/node-fetch": { "version": "2.6.4", diff --git a/package.json b/package.json index b088df87..d1d83261 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "devDependencies": { "@types/jest": "^29.5.3", "@types/lodash.deburr": "^4.1.6", - "@types/node": "^18.15.11", + "@types/node": "^20.5.1", "@types/semver": "^7.5.0", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1",