Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot]
bb0791003d Update configuration files 2026-07-19 04:08:09 +00:00
137 changed files with 56303 additions and 71394 deletions

6
.eslintignore Normal file
View File

@@ -0,0 +1,6 @@
# Ignore list
/*
# Do not ignore these folders:
!__tests__/
!src/

51
.eslintrc.js Normal file
View File

@@ -0,0 +1,51 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin-jest/recommended',
'eslint-config-prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
'yoda': 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'node/no-extraneous-import': 'error'
},
overrides: [
{
files: ['**/*{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off',
}
}
],
env: {
node: true,
es6: true,
'jest/globals': true
}
};

View File

@@ -15,7 +15,7 @@ jobs:
dry-run-test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v6
- uses: ./
id: stale
with:

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v7
uses: actions/checkout@v6
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4

View File

@@ -10,10 +10,7 @@ allowed:
- cc0-1.0
- unlicense
- 0bsd
- BlueOak-1.0.0
reviewed:
npm:
- "@actions/http-client"
- brace-expansion
- balanced-match

View File

@@ -1,6 +1,6 @@
---
name: "@actions/cache"
version: 6.3.0
version: 5.0.5
type: npm
summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache

View File

@@ -1,6 +1,6 @@
---
name: "@actions/core"
version: 3.0.1
version: 2.0.3
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core

View File

@@ -1,6 +1,6 @@
---
name: "@actions/exec"
version: 3.0.0
version: 2.0.0
type: npm
summary: Actions exec lib
homepage: https://github.com/actions/toolkit/tree/main/packages/exec

View File

@@ -1,6 +1,6 @@
---
name: "@actions/github"
version: 9.1.1
version: 7.0.0
type: npm
summary: Actions github lib
homepage: https://github.com/actions/toolkit/tree/main/packages/github

View File

@@ -1,6 +1,6 @@
---
name: "@actions/glob"
version: 0.7.0
version: 0.5.1
type: npm
summary: Actions glob lib
homepage: https://github.com/actions/toolkit/tree/main/packages/glob

View File

@@ -1,32 +0,0 @@
---
name: "@actions/http-client"
version: 4.0.1
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: other
licenses:
- sources: LICENSE
text: |
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
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: []

View File

@@ -1,6 +1,6 @@
---
name: "@actions/io"
version: 3.0.2
version: 2.0.0
type: npm
summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/main/packages/io

View File

@@ -1,6 +1,6 @@
---
name: "@azure/abort-controller"
version: 2.2.0
version: 1.1.0
type: npm
summary: Microsoft Azure SDK for JavaScript - Aborter
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
@@ -8,9 +8,9 @@ license: mit
licenses:
- sources: LICENSE
text: |
Copyright (c) Microsoft Corporation.
The MIT License (MIT)
MIT License
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -22,7 +22,7 @@ licenses:
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
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

View File

@@ -1,17 +1,16 @@
---
name: xml-naming
version: 0.3.0
name: "@azure/abort-controller"
version: 2.1.2
type: npm
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
for XML 1.0 and 1.1
homepage:
summary: Microsoft Azure SDK for JavaScript - Aborter
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
The MIT License (MIT)
Copyright (c) 2026 Natural Intelligence
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +29,4 @@ licenses:
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
notices: []

View File

@@ -1,10 +1,10 @@
---
name: "@azure/core-auth"
version: 1.11.0
version: 1.10.1
type: npm
summary: Provides low-level interfaces and helper methods for authentication in Azure
SDK
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-auth/README.md
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/README.md
license: mit
licenses:
- sources: LICENSE

View File

@@ -1,6 +1,6 @@
---
name: "@azure/core-client"
version: 1.11.1
version: 1.10.1
type: npm
summary: Core library for interfacing with AutoRest generated code
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/

View File

@@ -1,9 +1,9 @@
---
name: "@azure/core-http-compat"
version: 2.5.0
version: 2.3.1
type: npm
summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-http-compat/
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/
license: mit
licenses:
- sources: LICENSE

View File

@@ -1,6 +1,6 @@
---
name: "@azure/core-paging"
version: 1.7.0
version: 1.6.2
type: npm
summary: Core types for paging async iterable iterators
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md
@@ -8,9 +8,9 @@ license: mit
licenses:
- sources: LICENSE
text: |
Copyright (c) Microsoft Corporation.
The MIT License (MIT)
MIT License
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -22,7 +22,7 @@ licenses:
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
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

View File

@@ -1,32 +0,0 @@
---
name: "@azure/core-rest-pipeline"
version: 1.25.0
type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-rest-pipeline/README.md
license: mit
licenses:
- sources: LICENSE
text: |
Copyright (c) Microsoft Corporation.
MIT License
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: []

View File

@@ -1,6 +1,6 @@
---
name: "@azure/core-rest-pipeline"
version: 1.23.0
version: 1.22.2
type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/

View File

@@ -1,6 +1,6 @@
---
name: "@azure/core-tracing"
version: 1.4.0
version: 1.3.1
type: npm
summary: Provides low-level interfaces and helper methods for tracing in Azure SDK
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/README.md

View File

@@ -1,6 +1,6 @@
---
name: "@azure/core-util"
version: 1.14.0
version: 1.13.1
type: npm
summary: Core library for shared utility methods
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/

View File

@@ -1,9 +1,9 @@
---
name: "@azure/core-xml"
version: 1.6.0
version: 1.5.0
type: npm
summary: Core library for interacting with XML payloads
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-xml/README.md
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/
license: mit
licenses:
- sources: LICENSE

View File

@@ -1,6 +1,6 @@
---
name: "@azure/logger"
version: 1.4.0
version: 1.3.0
type: npm
summary: Microsoft Azure SDK for JavaScript - Logger
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md

View File

@@ -1,6 +1,6 @@
---
name: "@azure/storage-blob"
version: 12.31.0
version: 12.30.0
type: npm
summary: Microsoft Azure Storage SDK for JavaScript - Blob
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/

View File

@@ -1,9 +1,9 @@
---
name: "@azure/storage-common"
version: 12.5.0
version: 12.2.0
type: npm
summary: Azure Storage Common Client Library for JavaScript
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-common/README.md
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/
license: mit
licenses:
- sources: LICENSE

View File

@@ -1,6 +1,6 @@
---
name: "@nodable/entities"
version: 3.1.0
version: 2.1.0
type: npm
summary: Entity parser for XML, HTML, External entites with security and NCR control
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/auth-token"
version: 6.0.0
version: 4.0.0
type: npm
summary: GitHub API token authentication for browsers and Node.js
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/core"
version: 7.0.6
version: 5.2.2
type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/endpoint"
version: 11.0.3
version: 9.0.6
type: npm
summary: Turns REST API endpoints into generic request options
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/graphql"
version: 9.0.3
version: 7.1.1
type: npm
summary: GitHub GraphQL API client for browsers and Node
homepage:

View File

@@ -1,14 +1,14 @@
---
name: "@octokit/openapi-types"
version: 27.0.0
version: 20.0.0
type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
Copyright (c) GitHub 2025 - Licensed as MIT.
text: |-
Copyright 2020 Gregor Martynus
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:

View File

@@ -0,0 +1,20 @@
---
name: "@octokit/openapi-types"
version: 24.2.0
type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage:
license: mit
licenses:
- sources: LICENSE
text: |-
Copyright 2020 Gregor Martynus
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](LICENSE)"
notices: []

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/plugin-paginate-rest"
version: 14.0.0
version: 9.2.2
type: npm
summary: Octokit plugin to paginate REST API endpoint responses
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/plugin-rest-endpoint-methods"
version: 17.0.0
version: 10.4.1
type: npm
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/plugin-retry"
version: 8.1.0
version: 6.1.0
type: npm
summary: Automatic retry plugin for octokit
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/request-error"
version: 7.1.0
version: 5.1.1
type: npm
summary: Error class for Octokit request errors
homepage:

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/request"
version: 10.0.11
version: 8.4.1
type: npm
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
and Node

View File

@@ -1,6 +1,6 @@
---
name: "@octokit/types"
version: 16.0.0
version: 12.6.0
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage:

View File

@@ -0,0 +1,20 @@
---
name: "@octokit/types"
version: 13.10.0
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License Copyright (c) 2019 Octokit contributors
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 (including the next paragraph) 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](LICENSE)"
notices: []

View File

@@ -1,9 +1,9 @@
---
name: "@typespec/ts-http-runtime"
version: 0.3.9
version: 0.3.2
type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/ts-http-runtime/README.md
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/
license: mit
licenses:
- sources: LICENSE

View File

@@ -1,35 +0,0 @@
---
name: anynum
version: 1.0.1
type: npm
summary: Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to
ASCII numerals. Zero dependencies, performance-first.
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
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
notices: []

View File

@@ -1,18 +1,39 @@
---
name: balanced-match
version: 4.0.4
version: 1.0.2
type: npm
summary: Match balanced character pairs, like "{" and "}"
homepage:
homepage: https://github.com/juliangruber/balanced-match
license: mit
licenses:
- sources: LICENSE.md
text: |
(MIT)
Original code Copyright Julian Gruber <julian@juliangruber.com>
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
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)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
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

View File

@@ -1,6 +1,6 @@
---
name: before-after-hook
version: 4.0.0
version: 2.2.3
type: npm
summary: asynchronous before/error/after hooks for internal functionality
homepage:

View File

@@ -1,18 +1,16 @@
---
name: brace-expansion
version: 5.0.9
version: 1.1.14
type: npm
summary: Brace expansion as known from sh/bash
homepage:
homepage: https://github.com/juliangruber/brace-expansion
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright Julian Gruber <julian@juliangruber.com>
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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
@@ -24,6 +22,29 @@ licenses:
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)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
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

31
.licenses/npm/concat-map.dep.yml generated Normal file
View File

@@ -0,0 +1,31 @@
---
name: concat-map
version: 0.0.1
type: npm
summary: concatenative mapdashery
homepage:
license: other
licenses:
- sources: LICENSE
text: |
This software is released under the MIT license:
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.markdown
text: MIT
notices: []

View File

@@ -1,47 +0,0 @@
---
name: content-type
version: 2.0.0
type: npm
summary: Create and parse HTTP Content-Type header
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
(The MIT License)
Copyright (c) 2015 Douglas Christopher Wilson
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](LICENSE)
[npm-image]: https://img.shields.io/npm/v/content-type
[npm-url]: https://npmjs.org/package/content-type
[downloads-image]: https://img.shields.io/npm/dm/content-type
[downloads-url]: https://npmjs.org/package/content-type
[build-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-type/ci.yml?branch=master
[build-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml?query=branch%3Amaster
[coverage-image]: https://img.shields.io/codecov/c/gh/jshttp/content-type
[coverage-url]: https://codecov.io/gh/jshttp/content-type
[license-image]: http://img.shields.io/npm/l/content-type.svg?style=flat
[license-url]: LICENSE
notices: []

View File

@@ -1,6 +1,6 @@
---
name: debug
version: 4.4.3
version: 4.3.4
type: npm
summary: Lightweight debugging utility for Node.js and the browser
homepage:

28
.licenses/npm/deprecation.dep.yml generated Normal file
View File

@@ -0,0 +1,28 @@
---
name: deprecation
version: 2.3.1
type: npm
summary: Log a deprecation message with stack
homepage: https://github.com/gr2m/deprecation#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Gregor Martynus 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.
- sources: README.md
text: "[ISC](LICENSE)"
notices: []

View File

@@ -1,6 +1,6 @@
---
name: fast-xml-builder
version: 1.3.1
version: 1.1.8
type: npm
summary: Build XML from JSON without C/C++ based libraries
homepage:

View File

@@ -1,6 +1,6 @@
---
name: fast-xml-parser
version: 5.11.2
version: 5.7.3
type: npm
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
homepage:

View File

@@ -1,35 +0,0 @@
---
name: is-unsafe
version: 2.0.2
type: npm
summary: Zero-dependency, DOM-free, pure predicate for detecting unsafe strings across
HTML, XML, SVG, SQL, SHELL, and REGEX contexts
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
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
notices: []

View File

@@ -1,33 +0,0 @@
---
name: json-with-bigint
version: 3.5.8
type: npm
summary: JS library that allows you to easily serialize and deserialize data with
BigInt values
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2023 Ivan Korolenko
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: []

View File

@@ -1,66 +1,26 @@
---
name: minimatch
version: 10.2.6
version: 3.1.5
type: npm
summary: a glob matcher in javascript
homepage:
license: BlueOak-1.0.0
license: isc
licenses:
- sources: LICENSE.md
- sources: LICENSE
text: |
# Blue Oak Model License
The ISC License
Version 1.0.0
Copyright (c) Isaac Z. Schlueter and Contributors
## Purpose
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.
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
**_As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim._**
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: []

View File

@@ -1,6 +1,6 @@
---
name: ms
version: 2.1.3
version: 2.1.2
type: npm
summary: Tiny millisecond conversion utility
homepage:
@@ -10,7 +10,7 @@ licenses:
text: |
The MIT License (MIT)
Copyright (c) 2020 Vercel, Inc.
Copyright (c) 2016 Zeit, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

26
.licenses/npm/once.dep.yml generated Normal file
View File

@@ -0,0 +1,26 @@
---
name: once
version: 1.4.0
type: npm
summary: Run a function exactly one time
homepage: https://github.com/isaacs/once#readme
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: []

View File

@@ -1,6 +1,6 @@
---
name: path-expression-matcher
version: 1.6.2
version: 1.5.0
type: npm
summary: Efficient path tracking and pattern matching for XML/JSON parsers
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme

View File

@@ -1,6 +1,6 @@
---
name: semver
version: 7.8.5
version: 6.3.1
type: npm
summary: The semantic version parser used by npm.
homepage:

26
.licenses/npm/semver-7.7.4.dep.yml generated Normal file
View File

@@ -0,0 +1,26 @@
---
name: semver
version: 7.7.4
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: []

View File

@@ -1,6 +1,6 @@
---
name: strnum
version: 2.5.1
version: 2.2.3
type: npm
summary: Parse String to Number based on configuration
homepage:

View File

@@ -1,6 +1,6 @@
---
name: undici
version: 6.28.0
version: 6.27.0
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org

View File

@@ -1,8 +1,8 @@
---
name: universal-user-agent
version: 7.0.3
version: 6.0.1
type: npm
summary: Get a user agent string across all JavaScript Runtime Environments
summary: Get a user agent string in both browser and node
homepage:
license: other
licenses:
@@ -10,7 +10,7 @@ licenses:
text: |
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
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.

26
.licenses/npm/wrappy.dep.yml generated Normal file
View File

@@ -0,0 +1,26 @@
---
name: wrappy
version: 1.0.2
type: npm
summary: Callback wrapping utility
homepage: https://github.com/npm/wrappy
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: []

11
.prettierrc.js Normal file
View File

@@ -0,0 +1,11 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'none',
bracketSpacing: false,
arrowParens: 'avoid'
};

View File

@@ -3,10 +3,6 @@
[![Basic validation](https://github.com/actions/stale/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/basic-validation.yml)
[![e2e tests](https://github.com/actions/stale/actions/workflows/e2e-tests.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/e2e-tests.yml)
## What's changed in V11
- **Migrated to ESM** internally to support the latest `@actions/*` package versions. No changes to action inputs, outputs, or behavior.
## Breaking changes in V10
- Upgraded action from node20 to node 24
@@ -110,7 +106,6 @@ Every argument is optional.
| [ignore-pr-updates](#ignore-pr-updates) | Override [ignore-updates](#ignore-updates) for PRs only | |
| [include-only-assigned](#include-only-assigned) | Process only assigned issues | `false` |
| [sort-by](#sort-by) | What to sort issues and PRs by | `created` |
| [exempt-issue-types](#exempt-issue-types) | Issue types on issues exempted from stale/closed. | |
| [only-issue-types](#only-issue-types) | Only issues with a matching type are processed as stale/closed. | |
### List of output options
@@ -568,17 +563,6 @@ Useful to sort the issues and PRs by the specified field. It accepts `created`,
Default value: `created`
#### exempt-issue-types
A comma separated list of issue types that can be assigned to issues to exclude them from being marked as stale
(e.g: `Bug,Feature`)
If unset (or an empty string), this option will not alter the stale workflow.
If a type is listed in both `exempt-issue-types` and `only-issue-types`, `exempt-issue-types` takes precedence.
Default value: unset
#### only-issue-types
A comma separated list of allowed issue types. Only issues with a matching type will be processed (e.g.: `bug,question`).

View File

@@ -1,11 +1,10 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssue} from '../src/interfaces/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {StateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssue} from '../src/interfaces/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {StateMock} from './classes/state-mock';
let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock;

View File

@@ -1,10 +1,9 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
interface ITestData {
id: number;

View File

@@ -1,10 +1,10 @@
import {Issue} from '../../src/classes/issue.js';
import {IssuesProcessor} from '../../src/classes/issues-processor.js';
import {IComment} from '../../src/interfaces/comment.js';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
import {IPullRequest} from '../../src/interfaces/pull-request.js';
import {IState} from '../../src/interfaces/state/state.js';
import {IIssueEvent} from '../../src/interfaces/issue-event.js';
import {Issue} from '../../src/classes/issue';
import {IssuesProcessor} from '../../src/classes/issues-processor';
import {IComment} from '../../src/interfaces/comment';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
import {IPullRequest} from '../../src/interfaces/pull-request';
import {IState} from '../../src/interfaces/state/state';
import {IIssueEvent} from '../../src/interfaces/issue-event';
export class IssuesProcessorMock extends IssuesProcessor {
constructor(

View File

@@ -1,5 +1,5 @@
import {IState} from '../../src/interfaces/state/state.js';
import {IIssue} from '../../src/interfaces/issue.js';
import {IState} from '../../src/interfaces/state/state';
import {IIssue} from '../../src/interfaces/issue';
export class StateMock implements IState {
// eslint-disable-next-line @typescript-eslint/no-unused-vars

View File

@@ -1,4 +1,4 @@
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
// Default options for use in tests.
// Mirrors the defaults defined in action.yml

View File

@@ -1,12 +1,11 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssue} from '../src/interfaces/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IPullRequest} from '../src/interfaces/pull-request.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssue} from '../src/interfaces/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IPullRequest} from '../src/interfaces/pull-request';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock;

View File

@@ -1,203 +0,0 @@
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
describe('exempt-issue-types option', () => {
test('should skip issues with an exempt type', async () => {
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
exemptIssueTypes: 'question,discussion'
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A bug',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'bug'
),
generateIssue(
opts,
2,
'A question',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'question'
),
generateIssue(
opts,
3,
'A discussion',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'discussion'
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
// The exempt types should not be processed/marked stale
expect(processor.staleIssues.map(i => i.title)).toEqual(['A bug']);
});
test('should process all issues if exemptIssueTypes is unset', async () => {
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
exemptIssueTypes: ''
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A bug',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'bug'
),
generateIssue(
opts,
2,
'A feature',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'feature'
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
expect(processor.staleIssues.map(i => i.title)).toEqual([
'A bug',
'A feature'
]);
});
test('should take precedence over onlyIssueTypes', async () => {
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
exemptIssueTypes: 'bug',
onlyIssueTypes: 'bug'
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A bug',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
[],
false,
false,
undefined,
[],
'bug'
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
expect(processor.staleIssues).toEqual([]);
});
test('should ignore exemptIssueTypes filter when item is a pull request', async () => {
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
exemptIssueTypes: 'bug'
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A pull request',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
true,
[],
false,
false,
undefined,
[],
'bug'
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
expect(processor.staleIssues.map(i => i.title)).toEqual(['A pull request']);
});
});

View File

@@ -1,4 +1,4 @@
import {IIssue} from '../../src/interfaces/issue.js';
import {IIssue} from '../../src/interfaces/issue';
export function generateIIssue(
partialIssue?: Readonly<Partial<IIssue>>

View File

@@ -1,7 +1,7 @@
import {Issue} from '../../src/classes/issue.js';
import {IUserAssignee} from '../../src/interfaces/assignee.js';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
import {IsoDateString} from '../../src/types/iso-date-string.js';
import {Issue} from '../../src/classes/issue';
import {IUserAssignee} from '../../src/interfaces/assignee';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
import {IsoDateString} from '../../src/types/iso-date-string';
export function generateIssue(
options: IIssuesProcessorOptions,

View File

@@ -1,12 +1,11 @@
import {jest, expect, it, test} from '@jest/globals';
import * as github from '@actions/github';
import {Issue} from '../src/classes/issue.js';
import {IComment} from '../src/interfaces/comment.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IComment} from '../src/interfaces/comment';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
test('processing an issue with no label will make it stale and close it, if it is old enough only if days-before-close is set to 0', async () => {
const opts: IIssuesProcessorOptions = {

View File

@@ -1,10 +1,9 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
interface ITestData {
isPullRequest: boolean;

View File

@@ -1,10 +1,9 @@
import {describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
describe('only-issue-types option', () => {
test('should only process issues with allowed type', async () => {

View File

@@ -1,11 +1,10 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssue} from '../src/interfaces/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssue} from '../src/interfaces/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock;

View File

@@ -1,11 +1,10 @@
import {beforeEach, describe, expect, it, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IsoDateString} from '../src/types/iso-date-string.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock, StateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IsoDateString} from '../src/types/iso-date-string';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock, StateMock} from './classes/state-mock';
describe('operations-per-run option', (): void => {
let sut: SUT;

View File

@@ -1,13 +1,12 @@
import {afterEach, beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {IState} from '../src/interfaces/state/state.js';
import {IIssueEvent} from '../src/interfaces/issue-event.js';
import {IssuesProcessor} from '../src/classes/issues-processor.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
import {IState} from '../src/interfaces/state/state';
import {IIssueEvent} from '../src/interfaces/issue-event';
import {IssuesProcessor} from '../src/classes/issues-processor';
describe('remove-stale-when-updated with stale label events', (): void => {
const markedStaleOn = '2025-01-01T00:00:00Z';

View File

@@ -1,12 +1,11 @@
import {beforeEach, describe, expect, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssue} from '../src/interfaces/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {ILabel} from '../src/interfaces/label.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssue} from '../src/interfaces/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {ILabel} from '../src/interfaces/label';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock;

View File

@@ -1,31 +1,12 @@
import {jest, afterEach, describe, expect, it} from '@jest/globals';
import type {IStateStorage} from '../src/interfaces/state/state-storage.js';
import type {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {Issue} from '../src/classes/issue.js';
import {generateIssue} from './functions/generate-issue.js';
import type {IState} from '../src/interfaces/state/state.js';
jest.unstable_mockModule('@actions/core', () => ({
debug: jest.fn(),
info: jest.fn(),
warning: jest.fn(),
error: jest.fn(),
setFailed: jest.fn(),
getInput: jest.fn(),
group: jest
.fn()
.mockImplementation((...args: unknown[]) =>
(args[1] as () => Promise<unknown>)()
)
}));
const {State} = await import('../src/classes/state/state.js');
const {IssuesProcessorMock} =
await import('./classes/issues-processor-mock.js');
const core = await import('@actions/core');
type IssueID = number;
import {IStateStorage} from '../src/interfaces/state/state-storage';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {Issue} from '../src/classes/issue';
import {generateIssue} from './functions/generate-issue';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {IssueID, State} from '../src/classes/state/state';
import {IState} from '../src/interfaces/state/state';
import * as core from '@actions/core';
const stateStorage: IStateStorage = {
restore(): Promise<string> {
@@ -40,7 +21,17 @@ const getProcessedIssuesIDs = (state: IState): Set<IssueID> =>
(state as unknown as {processedIssuesIDs: Set<IssueID>}).processedIssuesIDs;
describe('state', (): void => {
let debugSpy: jest.SpyInstance;
let infoSpy: jest.SpyInstance;
let warningSpy: jest.SpyInstance;
beforeEach(() => {
debugSpy = jest.spyOn(core, 'debug');
infoSpy = jest.spyOn(core, 'info');
warningSpy = jest.spyOn(core, 'warning');
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
});
@@ -94,10 +85,8 @@ describe('state', (): void => {
expect(addIssueToProcessedSpy).toHaveBeenCalledTimes(1);
expect(addIssueToProcessedSpy).toHaveBeenCalledWith(testIssue1);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith('state: reset');
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 1 as processed'
);
expect(debugSpy).toHaveBeenCalledWith('state: reset');
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed');
});
it('issueProcessor should skip the issue marked as proceeded', async () => {
@@ -120,7 +109,7 @@ describe('state', (): void => {
const TestIssueList: Issue[] = [testIssue1, testIssue2];
const state = new State(stateStorage, opts);
state.addIssueToProcessed(testIssue1);
jest.mocked(core.debug).mockClear();
debugSpy.mockClear();
const addIssueToProcessedSpy = jest.spyOn(state, 'addIssueToProcessed');
const isIssueProcessedSpy = jest.spyOn(state, 'isIssueProcessed');
const processor = new IssuesProcessorMock(
@@ -140,10 +129,8 @@ describe('state', (): void => {
expect(processor.staleIssues.length).toStrictEqual(1);
expect(processor.closedIssues.length).toStrictEqual(1);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith('state: reset');
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 2 as processed'
);
expect(debugSpy).toHaveBeenCalledWith('state: reset');
expect(debugSpy).toHaveBeenCalledWith('state: mark 2 as processed');
});
it('state should not be reset if not all issues are proceeded', async () => {
@@ -177,14 +164,12 @@ describe('state', (): void => {
await processor.processIssues(1);
// make sure not all issues are proceeded
expect(jest.mocked(core.warning).mock.calls[2][0]).toContain(
expect(warningSpy.mock.calls[2][0]).toContain(
'No more operations left! Exiting...'
);
expect(resetSpy).toHaveBeenCalledTimes(0);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 1 as processed'
);
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed');
});
it('state should be reset if all issues are proceeded', async () => {
@@ -217,16 +202,12 @@ describe('state', (): void => {
await processor.processIssues(1);
// make sure all issues are proceeded
expect(jest.mocked(core.info).mock.calls[71][0]).toContain(
expect(infoSpy.mock.calls[71][0]).toContain(
'No more issues found to process. Exiting...'
);
expect(resetSpy).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 1 as processed'
);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 2 as processed'
);
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed');
expect(debugSpy).toHaveBeenCalledWith('state: mark 2 as processed');
});
});

View File

@@ -1,11 +1,10 @@
import {beforeEach, describe, expect, it, test} from '@jest/globals';
import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IsoDateString} from '../src/types/iso-date-string.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
import {Issue} from '../src/classes/issue';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IsoDateString} from '../src/types/iso-date-string';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
import {alwaysFalseStateMock} from './classes/state-mock';
describe('ignore-updates options', (): void => {
let sut: SUT;

View File

@@ -208,10 +208,6 @@ inputs:
description: 'Only the issues or the pull requests with an assignee will be marked as stale automatically.'
default: 'false'
required: false
exempt-issue-types:
description: 'Issues with a matching type are exempt from being processed as stale/closed. Defaults to `[]` (disabled) and can be a comma-separated list of issue types.'
default: ''
required: false
only-issue-types:
description: 'Only issues with a matching type are processed as stale/closed. Defaults to `[]` (disabled) and can be a comma-separated list of issue types.'
default: ''

119229
dist/index.js vendored

File diff suppressed because one or more lines are too long

3
dist/package.json vendored
View File

@@ -1,3 +0,0 @@
{
"type": "module"
}

11
jest.config.js Normal file
View File

@@ -0,0 +1,11 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
};

View File

@@ -1,22 +0,0 @@
export default {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
diagnostics: {
ignoreCodes: [151002]
}
}
]
},
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: ['node_modules/(?!(@actions|@octokit)/)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
verbose: true
};

6566
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,20 @@
{
"name": "stale-action",
"version": "11.0.0",
"version": "10.4.0",
"private": true,
"type": "module",
"description": "Marks old issues and PRs as stale",
"main": "lib/main.js",
"scripts": {
"build": "tsc --project tsconfig.app.json && ncc build lib/main.js",
"format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
"format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
"lint": "eslint \"**/*.ts\"",
"lint:fix": "eslint \"**/*.ts\" --fix",
"build": "tsc --project tsconfig.app.json && ncc build",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
"lint:all": "npm run format-check && npm run lint",
"lint:all:fix": "npm run format && npm run lint:fix",
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand",
"test:only-errors": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --reporters jest-silent-reporter --silent",
"test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch --notify --expand",
"test": "jest --config ./jest.config.js",
"test:only-errors": "jest --reporters jest-silent-reporter --silent",
"test:watch": "jest --watch --notify --expand",
"all": "npm run format && npm run lint && npm run build && npm test",
"all:ci": "npm run format && npm run lint && npm run build && npm run test:only-errors",
"prerelease": "npm run build",
@@ -38,33 +37,38 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^6.3.0",
"@actions/core": "^3.0.1",
"@actions/github": "^9.1.1",
"@octokit/core": "^7.0.6",
"@octokit/plugin-retry": "^8.1.0",
"lodash.deburr": "^4.1.0"
"@actions/cache": "^5.0.5",
"@actions/core": "^2.0.3",
"@actions/github": "^7.0.0",
"@octokit/core": "^5.2.2",
"@octokit/plugin-retry": "^6.1.0",
"lodash.deburr": "^4.1.0",
"semver": "^7.7.4"
},
"overrides": {
"undici": "6.27.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@jest/globals": "^30.4.1",
"@types/jest": "^29.5.14",
"@types/lodash.deburr": "^4.1.6",
"@types/node": "^24.13.3",
"@typescript-eslint/eslint-plugin": "^8.62.1",
"@typescript-eslint/parser": "^8.62.1",
"@vercel/ncc": "^0.44.1",
"ansi-styles": "^6.2.3",
"eslint": "^10.7.0",
"@types/node": "^24.3.1",
"@types/semver": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.36.1",
"ansi-styles": "5.2.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "^29.15.4",
"eslint-plugin-n": "^18.2.1",
"globals": "^17.7.0",
"jest": "^30.4.2",
"jest-silent-reporter": "^0.6.0",
"prettier": "^3.9.4",
"standard-version": "^9.5.0",
"terminal-link": "^5.0.0",
"ts-jest": "^29.4.12",
"typescript": "^6.0.3"
"eslint-plugin-jest": "^27.7.0",
"eslint-plugin-node": "^11.1.0",
"jest": "^29.6.2",
"jest-circus": "^29.5.0",
"jest-silent-reporter": "^0.5.0",
"js-yaml": "^4.1.1",
"prettier": "^2.8.7",
"standard-version": "^9.3.1",
"terminal-link": "^2.1.1",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
}
}

View File

@@ -1,10 +1,9 @@
import {beforeEach, describe, expect, it} from '@jest/globals';
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {generateIIssue} from '../../__tests__/functions/generate-iissue.js';
import {IIssue} from '../interfaces/issue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Assignees} from './assignees.js';
import {Issue} from './issue.js';
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options';
import {generateIIssue} from '../../__tests__/functions/generate-iissue';
import {IIssue} from '../interfaces/issue';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {Assignees} from './assignees';
import {Issue} from './issue';
describe('Assignees', (): void => {
let assignees: Assignees;

View File

@@ -1,11 +1,11 @@
import deburr from 'lodash.deburr';
import {Option} from '../enums/option.js';
import {wordsToList} from '../functions/words-to-list.js';
import {Assignee} from '../interfaces/assignee.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger.js';
import {LoggerService} from '../services/logger.service.js';
import {Option} from '../enums/option';
import {wordsToList} from '../functions/words-to-list';
import {Assignee} from '../interfaces/assignee';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {Issue} from './issue';
import {IssueLogger} from './loggers/issue-logger';
import {LoggerService} from '../services/logger.service';
type CleanAssignee = string;

View File

@@ -1,9 +1,9 @@
import {Option} from '../enums/option.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IPullRequest} from '../interfaces/pull-request.js';
import {LoggerService} from '../services/logger.service.js';
import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger.js';
import {Option} from '../enums/option';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {IPullRequest} from '../interfaces/pull-request';
import {LoggerService} from '../services/logger.service';
import {Issue} from './issue';
import {IssueLogger} from './loggers/issue-logger';
export class ExemptDraftPullRequest {
private readonly _options: IIssuesProcessorOptions;

View File

@@ -1,11 +1,10 @@
/* eslint jest/no-identical-title: "off" */
import {beforeEach, describe, expect, it} from '@jest/globals';
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {generateIIssue} from '../../__tests__/functions/generate-iissue.js';
import {IIssue} from '../interfaces/issue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IgnoreUpdates} from './ignore-updates.js';
import {Issue} from './issue.js';
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options';
import {generateIIssue} from '../../__tests__/functions/generate-iissue';
import {IIssue} from '../interfaces/issue';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {IgnoreUpdates} from './ignore-updates';
import {Issue} from './issue';
describe('IgnoreUpdates', (): void => {
let ignoreUpdates: IgnoreUpdates;

View File

@@ -1,7 +1,7 @@
import {Option} from '../enums/option.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger.js';
import {Option} from '../enums/option';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {Issue} from './issue';
import {IssueLogger} from './loggers/issue-logger';
export class IgnoreUpdates {
private readonly _options: IIssuesProcessorOptions;

View File

@@ -1,10 +1,9 @@
import {beforeEach, describe, expect, it} from '@jest/globals';
import {IUserAssignee} from '../interfaces/assignee.js';
import {IIssue} from '../interfaces/issue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {ILabel} from '../interfaces/label.js';
import {IMilestone} from '../interfaces/milestone.js';
import {Issue} from './issue.js';
import {IUserAssignee} from '../interfaces/assignee';
import {IIssue} from '../interfaces/issue';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {ILabel} from '../interfaces/label';
import {IMilestone} from '../interfaces/milestone';
import {Issue} from './issue';
describe('Issue', (): void => {
let issue: Issue;

View File

@@ -1,12 +1,12 @@
import {isLabeled} from '../functions/is-labeled.js';
import {isPullRequest} from '../functions/is-pull-request.js';
import {Assignee} from '../interfaces/assignee.js';
import {IIssue, OctokitIssue} from '../interfaces/issue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {ILabel} from '../interfaces/label.js';
import {IMilestone} from '../interfaces/milestone.js';
import {IsoDateString} from '../types/iso-date-string.js';
import {Operations} from './operations.js';
import {isLabeled} from '../functions/is-labeled';
import {isPullRequest} from '../functions/is-pull-request';
import {Assignee} from '../interfaces/assignee';
import {IIssue, OctokitIssue} from '../interfaces/issue';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {ILabel} from '../interfaces/label';
import {IMilestone} from '../interfaces/milestone';
import {IsoDateString} from '../types/iso-date-string';
import {Operations} from './operations';
export class Issue implements IIssue {
readonly title: string;

View File

@@ -1,34 +1,35 @@
import * as core from '@actions/core';
import {context, getOctokit} from '@actions/github';
import {Option} from '../enums/option.js';
import {getHumanizedDate} from '../functions/dates/get-humanized-date.js';
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than.js';
import {isValidDate} from '../functions/dates/is-valid-date.js';
import {isBoolean} from '../functions/is-boolean.js';
import {isLabeled} from '../functions/is-labeled.js';
import {cleanLabel} from '../functions/clean-label.js';
import {shouldMarkWhenStale} from '../functions/should-mark-when-stale.js';
import {wordsToList} from '../functions/words-to-list.js';
import {IComment} from '../interfaces/comment.js';
import {IIssueEvent} from '../interfaces/issue-event.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IPullRequest} from '../interfaces/pull-request.js';
import {Assignees} from './assignees.js';
import {IgnoreUpdates} from './ignore-updates.js';
import {ExemptDraftPullRequest} from './exempt-draft-pull-request.js';
import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger.js';
import {Logger} from './loggers/logger.js';
import {Milestones} from './milestones.js';
import {StaleOperations} from './stale-operations.js';
import {Statistics} from './statistics.js';
import {LoggerService} from '../services/logger.service.js';
import {OctokitIssue} from '../interfaces/issue.js';
import {GitHub} from '@actions/github/lib/utils';
import {Option} from '../enums/option';
import {getHumanizedDate} from '../functions/dates/get-humanized-date';
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than';
import {isValidDate} from '../functions/dates/is-valid-date';
import {isBoolean} from '../functions/is-boolean';
import {isLabeled} from '../functions/is-labeled';
import {cleanLabel} from '../functions/clean-label';
import {shouldMarkWhenStale} from '../functions/should-mark-when-stale';
import {wordsToList} from '../functions/words-to-list';
import {IComment} from '../interfaces/comment';
import {IIssueEvent} from '../interfaces/issue-event';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
import {IPullRequest} from '../interfaces/pull-request';
import {Assignees} from './assignees';
import {IgnoreUpdates} from './ignore-updates';
import {ExemptDraftPullRequest} from './exempt-draft-pull-request';
import {Issue} from './issue';
import {IssueLogger} from './loggers/issue-logger';
import {Logger} from './loggers/logger';
import {Milestones} from './milestones';
import {StaleOperations} from './stale-operations';
import {Statistics} from './statistics';
import {LoggerService} from '../services/logger.service';
import {OctokitIssue} from '../interfaces/issue';
import {retry} from '@octokit/plugin-retry';
import {IState} from '../interfaces/state/state.js';
import {IRateLimit} from '../interfaces/rate-limit.js';
import {RateLimit} from './rate-limit.js';
import {getSortField} from '../functions/get-sort-field.js';
import {IState} from '../interfaces/state/state';
import {IRateLimit} from '../interfaces/rate-limit';
import {RateLimit} from './rate-limit';
import {getSortField} from '../functions/get-sort-field';
/***
* Handle processing of issues for staleness/closure.
@@ -66,7 +67,7 @@ export class IssuesProcessor {
}
readonly operations: StaleOperations;
readonly client: ReturnType<typeof getOctokit>;
readonly client: InstanceType<typeof GitHub>;
readonly options: IIssuesProcessorOptions;
readonly staleIssues: Issue[] = [];
readonly closedIssues: Issue[] = [];
@@ -268,24 +269,6 @@ export class IssuesProcessor {
}
}
// exemptIssueTypes wins if both it and onlyIssueTypes are specified
if (this.options.exemptIssueTypes && !issue.isPullRequest) {
const exemptTypes = this.options.exemptIssueTypes
.split(',')
.map(t => t.trim().toLowerCase())
.filter(Boolean);
const issueType = (issue.issue_type || '').toLowerCase();
if (exemptTypes.includes(issueType)) {
issueLogger.info(
`Skipping this $$type because its type ('${
issue.issue_type
}') is in exemptIssueTypes (${exemptTypes.join(', ')})`
);
IssuesProcessor._endIssueProcessing(issue);
return;
}
}
const onlyLabels: string[] = wordsToList(this._getOnlyLabels(issue));
if (onlyLabels.length > 0) {
@@ -616,9 +599,7 @@ export class IssuesProcessor {
new Issue(this.options, issue as Readonly<OctokitIssue>)
);
} catch (error) {
throw Error(`Getting issues was blocked by the error: ${error.message}`, {
cause: error
});
throw Error(`Getting issues was blocked by the error: ${error.message}`);
}
}
@@ -1051,7 +1032,11 @@ export class IssuesProcessor {
issue_number: issue.number,
state: 'closed',
state_reason: (this.options.closeIssueReason || undefined) as
'completed' | 'reopened' | 'not_planned' | null | undefined
| 'completed'
| 'reopened'
| 'not_planned'
| null
| undefined
});
}
} catch (error) {
@@ -1367,14 +1352,16 @@ export class IssuesProcessor {
}
private _getDaysBeforeIssueStaleUsedOptionName():
Option.DaysBeforeStale | Option.DaysBeforeIssueStale {
| Option.DaysBeforeStale
| Option.DaysBeforeIssueStale {
return isNaN(this.options.daysBeforeIssueStale)
? Option.DaysBeforeStale
: Option.DaysBeforeIssueStale;
}
private _getDaysBeforePrStaleUsedOptionName():
Option.DaysBeforeStale | Option.DaysBeforePrStale {
| Option.DaysBeforeStale
| Option.DaysBeforePrStale {
return isNaN(this.options.daysBeforePrStale)
? Option.DaysBeforeStale
: Option.DaysBeforePrStale;

View File

@@ -1,26 +1,16 @@
import {jest, beforeEach, describe, expect, it} from '@jest/globals';
import type {Issue as IssueType} from '../issue.js';
import type {IssueLogger as IssueLoggerType} from './issue-logger.js';
jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
error: jest.fn()
}));
const {DefaultProcessorOptions} =
await import('../../../__tests__/constants/default-processor-options.js');
const {generateIIssue} =
await import('../../../__tests__/functions/generate-iissue.js');
const {Issue} = await import('../issue.js');
const {IssueLogger} = await import('./issue-logger.js');
const core = await import('@actions/core');
import {DefaultProcessorOptions} from '../../../__tests__/constants/default-processor-options';
import {generateIIssue} from '../../../__tests__/functions/generate-iissue';
import {Issue} from '../issue';
import {IssueLogger} from './issue-logger';
import * as core from '@actions/core';
describe('IssueLogger', (): void => {
let issue: IssueType;
let issueLogger: IssueLoggerType;
let issue: Issue;
let issueLogger: IssueLogger;
let message: string;
let coreWarningSpy: jest.SpyInstance;
describe('warning()', (): void => {
beforeEach((): void => {
message = 'dummy-message';
@@ -31,6 +21,8 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
});
it('should log a warning with the given message and with the issue number as prefix', (): void => {
@@ -38,17 +30,19 @@ describe('IssueLogger', (): void => {
issueLogger.warning(message);
expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining('[#8]')
);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining('dummy-message')
);
});
});
describe('info()', (): void => {
let coreInfoSpy: jest.SpyInstance;
beforeEach((): void => {
message = 'dummy-message';
issue = new Issue(
@@ -58,6 +52,8 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreInfoSpy = jest.spyOn(core, 'info').mockImplementation();
});
it('should log an information with the given message and with the issue number as prefix', (): void => {
@@ -65,17 +61,17 @@ describe('IssueLogger', (): void => {
issueLogger.info(message);
expect(jest.mocked(core.info)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.info)).toHaveBeenCalledWith(
expect.stringContaining('[#8]')
);
expect(jest.mocked(core.info)).toHaveBeenCalledWith(
expect(coreInfoSpy).toHaveBeenCalledTimes(1);
expect(coreInfoSpy).toHaveBeenCalledWith(expect.stringContaining('[#8]'));
expect(coreInfoSpy).toHaveBeenCalledWith(
expect.stringContaining('dummy-message')
);
});
});
describe('error()', (): void => {
let coreErrorSpy: jest.SpyInstance;
beforeEach((): void => {
message = 'dummy-message';
issue = new Issue(
@@ -85,6 +81,8 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreErrorSpy = jest.spyOn(core, 'error').mockImplementation();
});
it('should log an error with the given message and with the issue number as prefix', (): void => {
@@ -92,11 +90,11 @@ describe('IssueLogger', (): void => {
issueLogger.error(message);
expect(jest.mocked(core.error)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.error)).toHaveBeenCalledWith(
expect(coreErrorSpy).toHaveBeenCalledTimes(1);
expect(coreErrorSpy).toHaveBeenCalledWith(
expect.stringContaining('[#8]')
);
expect(jest.mocked(core.error)).toHaveBeenCalledWith(
expect(coreErrorSpy).toHaveBeenCalledWith(
expect.stringContaining('dummy-message')
);
});
@@ -112,14 +110,15 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message);
expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining('[#123]')
);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining('dummy-message')
);
});
@@ -143,14 +142,15 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message);
expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining(`[#8]`)
);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining(
`The ${replacement} will stale! ${replacement} will soon be closed!`
)
@@ -177,14 +177,15 @@ describe('IssueLogger', (): void => {
})
);
issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message);
expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining(`[#8]`)
);
expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect(coreWarningSpy).toHaveBeenCalledWith(
expect.stringContaining(`${replacement} will stale`)
);
}

Some files were not shown because too many files have changed in this diff Show More