Compare commits

...

42 Commits

Author SHA1 Message Date
Milos Pantic
1160a22402 Merge pull request #965 from actions/dependabot/npm_and_yarn/prettier-2.8.6
build(deps-dev): bump prettier from 2.8.4 to 2.8.6
2023-03-22 09:37:08 +01:00
dependabot[bot]
5f7b396645 build(deps-dev): bump prettier from 2.8.4 to 2.8.6
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.4...2.8.6)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 08:30:19 +00:00
Milos Pantic
b002e7ec85 Merge pull request #941 from panticmilos/vmpantic/rebuild-dist-vercel-bump
Rebuild dist for vercel bump
2023-03-22 09:29:33 +01:00
Milos Pantic
52903732a4 Rebuild dist after rebase 2023-03-21 23:39:03 +01:00
Milos Pantic
b006677dea Merge pull request #962 from actions/dependabot/npm_and_yarn/jest-and-types/jest-29.5.0
build(deps-dev): bump jest and @types/jest
2023-03-21 23:22:50 +01:00
Milos Pantic
4f29769aee Merge pull request #961 from actions/dependabot/npm_and_yarn/typescript-5.0.2
build(deps-dev): bump typescript from 4.9.4 to 5.0.2
2023-03-21 23:19:43 +01:00
dependabot[bot]
83453dd842 build(deps-dev): bump jest and @types/jest
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.4.3 to 29.5.0
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.5.0/packages/jest)

Updates `@types/jest` from 29.4.0 to 29.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 22:18:55 +00:00
Milos Pantic
79e8c046ed Merge pull request #960 from actions/dependabot/npm_and_yarn/types/node-18.15.3
build(deps-dev): bump @types/node from 18.11.18 to 18.15.3
2023-03-21 23:17:38 +01:00
Milos Pantic
75d4d955ac Remove labels on stale (#959) 2023-03-21 14:11:19 +01:00
dependabot[bot]
fac2d41a88 build(deps-dev): bump typescript from 4.9.4 to 5.0.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 5.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.4...v5.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 08:20:54 +00:00
dependabot[bot]
f8de0d2c00 build(deps-dev): bump @types/node from 18.11.18 to 18.15.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.18 to 18.15.3.
- [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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 08:20:50 +00:00
Sergey Dolin
01aa53266c Merge pull request #935 from akv-platform/invalid-creds2
abort the build on the error
2023-03-20 09:19:34 +01:00
github-actions[bot]
326b913d3a Update configuration files (#953)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-15 00:35:16 +01:00
Sergey Dolin
1226ccf00a Resolve conflicts 2023-03-13 19:39:37 +01:00
Sergey Dolin
fd837a17e5 Resolve changes requests 2023-03-13 19:39:37 +01:00
Sergey Dolin
b5b320bc53 fix licenses 2023-03-13 19:39:37 +01:00
Sergey Dolin
21a8be8320 upgrade to node 16 2023-03-13 19:39:35 +01:00
Sergey Dolin
50cb17ba49 force v12 2023-03-13 19:35:44 +01:00
Sergey Dolin
6bc202284c abort the build on the error 2023-03-13 19:35:42 +01:00
Marko Zivic
7769eadff1 Merge pull request #952 from akv-platform/reusable-workflow
Turn on automatic update of ESLint and Prettier configuration files
2023-03-10 10:56:23 +01:00
IvanZosimov
62c703ecbb Add update-config-files.yml 2023-03-09 13:59:40 +01:00
Ivan
47a58a6ddf Configure ESLint and update configuration for Prettier (#949)
* Update ESLint and Prettier configurations

* Rebuild action

* Update package.json
2023-03-09 14:57:55 +02:00
Milos Pantic
3d90444e57 Merge pull request #942 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.53.0
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.48.1 to 5.53.0
2023-02-21 16:37:36 +01:00
dependabot[bot]
d8dd192a23 build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.48.1 to 5.53.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.53.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 15:27:52 +00:00
Milos Pantic
7e0fd29df2 Merge pull request #939 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.52.0
build(deps-dev): bump @typescript-eslint/parser from 5.48.1 to 5.52.0
2023-02-21 16:26:31 +01:00
Milos Pantic
6e0e3b563a Merge pull request #937 from actions/dependabot/npm_and_yarn/prettier-2.8.4
build(deps-dev): bump prettier from 2.8.2 to 2.8.4
2023-02-21 16:23:56 +01:00
Milos Pantic
5ed25fd44f Merge pull request #925 from actions/dependabot/npm_and_yarn/jest-and-types/jest-29.4.1
build(deps-dev): bump jest and @types/jest
2023-02-21 16:18:44 +01:00
dependabot[bot]
e9515006d2 build(deps-dev): bump @typescript-eslint/parser from 5.48.1 to 5.52.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.48.1 to 5.52.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.52.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 11:57:52 +00:00
dependabot[bot]
a791a2919f build(deps-dev): bump prettier from 2.8.2 to 2.8.4
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.2 to 2.8.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.2...2.8.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 11:57:54 +00:00
Ivan
6fa13d7b00 Update workflow badges (#924) 2023-01-31 08:47:47 +02:00
dependabot[bot]
1d96fcfd44 build(deps-dev): bump jest and @types/jest
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.3.1 to 29.4.1
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.4.1/packages/jest)

Updates `@types/jest` from 27.0.2 to 29.4.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 11:01:05 +00:00
Sergey Dolin
c4a13d8dca Merge pull request #913 from akv-platform/v-sdolin/push-ref
Skip deleting the branch in the upstream of a forked repo
2023-01-26 08:58:51 +01:00
Sergey Dolin
04ed84ed9f Fix test 2023-01-24 07:48:55 +00:00
Sergey Dolin
c933d5be9d Build dist 2023-01-24 07:40:40 +00:00
Sergey Dolin
dad3c0f9e0 Skip deleting the branch in the upstream of a forkerd repo 2023-01-24 07:40:23 +00:00
Ivan
a8c816994c Bump npm dependencies (#915)
* Update dependencies

* Update semver dependency license
2023-01-17 10:54:58 +02:00
MaksimZhukov
ad32062f75 Update release-new-action-version.yml (#914) 2023-01-12 13:51:59 +01:00
dependabot[bot]
b1e5ead0b2 build(deps): bump json5 from 1.0.1 to 1.0.2 (#907)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 17:20:40 +01:00
Zack Koppert
0d675cc205 Switch examples to reference the v7 release (#905) 2023-01-05 16:23:19 +01:00
Marko Zivic
faa6c150f0 Merge pull request #892 from actions/update-codeowners-setup-actions-team
Update CODEOWNERS
2022-12-27 09:27:30 +01:00
Evgenii Korolevskii
65faf86995 Update CODEOWNERS 2022-12-26 09:43:55 +01:00
Marko Zivic
95d18187c1 Merge pull request #891 from actions/update-codeowners
Update CODEOWNERS
2022-12-23 08:26:55 +01:00
56 changed files with 15744 additions and 13972 deletions

View File

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

50
.eslintrc.js Normal file
View File

@@ -0,0 +1,50 @@
// 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-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}]
},
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

@@ -1,65 +0,0 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

1
.gitattributes vendored
View File

@@ -1 +1,2 @@
* text=auto eol=lf
.licenses/** -diff linguist-generated=true .licenses/** -diff linguist-generated=true

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.2.1 uses: actions/publish-action@v0.2.2
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -0,0 +1,11 @@
name: Update configuration files
on:
schedule:
- cron: '0 3 * * 0'
workflow_dispatch:
jobs:
call-update-configuration-files:
name: Update configuration files
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main

View File

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

View File

@@ -1,32 +0,0 @@
---
name: "@actions/http-client"
version: 1.0.11
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/http-client#readme
license: mit
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

@@ -3,7 +3,7 @@ name: "@actions/http-client"
version: 2.0.1 version: 2.0.1
type: npm type: npm
summary: Actions Http Client summary: Actions Http Client
homepage: https://github.com/actions/http-client#readme homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -3,7 +3,7 @@ name: "@octokit/auth-token"
version: 2.5.0 version: 2.5.0
type: npm type: npm
summary: GitHub API token authentication for browsers and Node.js summary: GitHub API token authentication for browsers and Node.js
homepage: https://github.com/octokit/auth-token.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/auth-token"
version: 3.0.3
type: npm
summary: GitHub API token authentication for browsers and Node.js
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The 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 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

@@ -3,7 +3,7 @@ name: "@octokit/core"
version: 3.6.0 version: 3.6.0
type: npm type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs summary: Extendable client for GitHub's REST & GraphQL APIs
homepage: https://github.com/octokit/core.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/core"
version: 4.2.0
type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The 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 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

@@ -3,7 +3,7 @@ name: "@octokit/endpoint"
version: 6.0.12 version: 6.0.12
type: npm type: npm
summary: Turns REST API endpoints into generic request options summary: Turns REST API endpoints into generic request options
homepage: https://github.com/octokit/endpoint.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/endpoint"
version: 7.0.5
type: npm
summary: Turns REST API endpoints into generic request options
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License
Copyright (c) 2018 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 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

@@ -3,7 +3,7 @@ name: "@octokit/graphql"
version: 4.8.0 version: 4.8.0
type: npm type: npm
summary: GitHub GraphQL API client for browsers and Node summary: GitHub GraphQL API client for browsers and Node
homepage: https://github.com/octokit/graphql.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/graphql"
version: 5.0.5
type: npm
summary: GitHub GraphQL API client for browsers and Node
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License
Copyright (c) 2018 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 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/openapi-types" name: "@octokit/openapi-types"
version: 11.2.0 version: 12.11.0
type: npm type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage: homepage:

View File

@@ -0,0 +1,20 @@
---
name: "@octokit/openapi-types"
version: 16.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 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,9 +1,9 @@
--- ---
name: "@octokit/plugin-paginate-rest" name: "@octokit/plugin-paginate-rest"
version: 2.17.0 version: 2.21.3
type: npm type: npm
summary: Octokit plugin to paginate REST API endpoint responses summary: Octokit plugin to paginate REST API endpoint responses
homepage: https://github.com/octokit/plugin-paginate-rest.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -1,9 +1,9 @@
--- ---
name: "@octokit/plugin-rest-endpoint-methods" name: "@octokit/plugin-rest-endpoint-methods"
version: 5.13.0 version: 5.16.2
type: npm type: npm
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/plugin-retry"
version: 4.1.1
type: npm
summary: Automatic retry plugin for octokit
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2018 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 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

@@ -2,9 +2,9 @@
name: "@octokit/request" name: "@octokit/request"
version: 5.6.3 version: 5.6.3
type: npm type: npm
summary: Send parameterized requests to GitHubs APIs with sensible defaults in browsers summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
and Node and Node
homepage: https://github.com/octokit/request.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,35 @@
---
name: "@octokit/request"
version: 6.2.3
type: npm
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
and Node
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License
Copyright (c) 2018 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 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

@@ -3,7 +3,7 @@ name: "@octokit/request-error"
version: 2.1.0 version: 2.1.0
type: npm type: npm
summary: Error class for Octokit request errors summary: Error class for Octokit request errors
homepage: https://github.com/octokit/request-error.js#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,34 @@
---
name: "@octokit/request-error"
version: 3.0.3
type: npm
summary: Error class for Octokit request errors
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The 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 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: "@octokit/types" name: "@octokit/types"
version: 6.34.0 version: 6.41.0
type: npm type: npm
summary: Shared TypeScript definitions for Octokit projects summary: Shared TypeScript definitions for Octokit projects
homepage: https://github.com/octokit/types.ts#readme homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -0,0 +1,20 @@
---
name: "@octokit/types"
version: 9.0.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: before-after-hook name: before-after-hook
version: 2.2.2 version: 2.2.3
type: npm type: npm
summary: asynchronous before/error/after hooks for internal functionality summary: asynchronous before/error/after hooks for internal functionality
homepage: https://github.com/gr2m/before-after-hook#readme homepage:
license: apache-2.0 license: apache-2.0
licenses: licenses:
- sources: LICENSE - sources: LICENSE

31
.licenses/npm/bottleneck.dep.yml generated Normal file
View File

@@ -0,0 +1,31 @@
---
name: bottleneck
version: 2.19.5
type: npm
summary: Distributed task scheduler and rate limiter
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License (MIT)
Copyright (c) 2014 Simon Grondin
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: node-fetch name: node-fetch
version: 2.6.7 version: 2.6.9
type: npm type: npm
summary: A light-weight module that brings window.fetch to node.js summary: A light-weight module that brings window.fetch to node.js
homepage: https://github.com/bitinn/node-fetch homepage: https://github.com/bitinn/node-fetch

View File

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

View File

@@ -1,7 +1,7 @@
.idea # Ignore list
.licenses /*
.vscode
dist # Do not ignore these folders:
lib !__tests__/
node_modules !.github/
package-lock.json !src/

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

@@ -1,11 +0,0 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"endOfLine": "auto"
}

View File

@@ -1,2 +1 @@
* @actions/actions-runtime * @actions/setup-actions-team
* @actions/runner-images-team

View File

@@ -1,5 +1,8 @@
# Close Stale Issues and PRs # Close Stale Issues and PRs
[![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)
Warns and then closes issues and PRs that have had no activity for a specified amount of time. Warns and then closes issues and PRs that have had no activity for a specified amount of time.
The configuration must be on the default branch and the default values will: The configuration must be on the default branch and the default values will:
@@ -60,6 +63,7 @@ Every argument is optional.
| [remove-issue-stale-when-updated](#remove-issue-stale-when-updated) | Remove stale label from issues on updates/comments | | | [remove-issue-stale-when-updated](#remove-issue-stale-when-updated) | Remove stale label from issues on updates/comments | |
| [remove-pr-stale-when-updated](#remove-pr-stale-when-updated) | Remove stale label from PRs on updates/comments | | | [remove-pr-stale-when-updated](#remove-pr-stale-when-updated) | Remove stale label from PRs on updates/comments | |
| [labels-to-add-when-unstale](#labels-to-add-when-unstale) | Add specified labels from issues/PRs when they become unstale | | | [labels-to-add-when-unstale](#labels-to-add-when-unstale) | Add specified labels from issues/PRs when they become unstale | |
| [labels-to-remove-when-stale](#labels-to-remove-when-stale) | Remove specified labels from issues/PRs when they become stale | |
| [labels-to-remove-when-unstale](#labels-to-remove-when-unstale) | Remove specified labels from issues/PRs when they become unstale | | | [labels-to-remove-when-unstale](#labels-to-remove-when-unstale) | Remove specified labels from issues/PRs when they become unstale | |
| [debug-only](#debug-only) | Dry-run | `false` | | [debug-only](#debug-only) | Dry-run | `false` |
| [ascending](#ascending) | Order to get issues/PRs | `false` | | [ascending](#ascending) | Order to get issues/PRs | `false` |
@@ -355,6 +359,15 @@ A comma delimited list of labels to add when a stale issue or pull request recei
Default value: unset Default value: unset
#### labels-to-remove-when-stale
A comma delimited list of labels to remove when an issue or pull request becomes stale and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) added to it.
Warning: each label results in a unique API call which can drastically consume the limit of [operations-per-run](#operations-per-run).
Default value: unset
Required Permission: `pull-requests: write`
#### labels-to-remove-when-unstale #### labels-to-remove-when-unstale
A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) removed from it. A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) removed from it.
@@ -540,7 +553,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale' stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale' stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
@@ -558,7 +571,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
days-before-stale: 30 days-before-stale: 30
@@ -577,7 +590,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
@@ -599,7 +612,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
@@ -623,7 +636,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
stale-issue-message: 'Stale issue message' stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message' stale-pr-message: 'Stale pull request message'
@@ -646,7 +659,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822 start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822
``` ```
@@ -663,7 +676,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
exempt-issue-milestones: 'future,alpha,beta' exempt-issue-milestones: 'future,alpha,beta'
exempt-pr-milestones: 'bugfix,improvement' exempt-pr-milestones: 'bugfix,improvement'
@@ -681,7 +694,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
exempt-all-pr-milestones: true exempt-all-pr-milestones: true
``` ```
@@ -698,7 +711,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
any-of-labels: 'needs-more-info,needs-demo' any-of-labels: 'needs-more-info,needs-demo'
# You can opt for 'only-labels' instead if your use-case requires all labels # You can opt for 'only-labels' instead if your use-case requires all labels
@@ -717,7 +730,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
exempt-issue-assignees: 'marco,polo' exempt-issue-assignees: 'marco,polo'
exempt-pr-assignees: 'marco' exempt-pr-assignees: 'marco'
@@ -735,7 +748,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v7
with: with:
exempt-all-pr-assignees: true exempt-all-pr-assignees: true
``` ```

View File

@@ -47,6 +47,7 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
exemptAllIssueAssignees: undefined, exemptAllIssueAssignees: undefined,
exemptAllPrAssignees: undefined, exemptAllPrAssignees: undefined,
enableStatistics: true, enableStatistics: true,
labelsToRemoveWhenStale: '',
labelsToRemoveWhenUnstale: '', labelsToRemoveWhenUnstale: '',
labelsToAddWhenUnstale: '', labelsToAddWhenUnstale: '',
ignoreUpdates: false, ignoreUpdates: false,

View File

@@ -130,7 +130,8 @@ class IssuesProcessorBuilder {
number: 0, number: 0,
draft: true, draft: true,
head: { head: {
ref: 'ref' ref: 'ref',
repo: null
} }
}); });
} }

View File

@@ -1220,6 +1220,48 @@ test('when the option "labelsToAddWhenUnstale" is set, the labels should be adde
expect(processor.addedLabelIssues).toHaveLength(1); expect(processor.addedLabelIssues).toHaveLength(1);
}); });
test('when the option "labelsToRemoveWhenStale" is set, the labels should be removed when stale', async () => {
expect.assertions(3);
const opts = {
...DefaultProcessorOptions,
removeStaleWhenUpdated: true,
labelsToRemoveWhenStale: 'test'
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'An issue that should have labels removed to it when stale',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
['Stale', 'test']
)
];
const processor = new IssuesProcessorMock(
opts,
async p => (p === 1 ? TestIssueList : []),
async () => [
{
user: {
login: 'notme',
type: 'User'
},
body: 'Body'
}
], // return a fake comment to indicate there was an update
async () => new Date().toDateString()
);
// process our fake issue list
await processor.processIssues(1);
expect(processor.closedIssues).toHaveLength(0);
expect(processor.staleIssues).toHaveLength(0);
// test label should have been removed
expect(processor.removedLabelIssues).toHaveLength(1);
});
test('stale label should not be removed if a comment was added by the bot (and the issue should be closed)', async () => { test('stale label should not be removed if a comment was added by the bot (and the issue should be closed)', async () => {
const opts = {...DefaultProcessorOptions, removeStaleWhenUpdated: true}; const opts = {...DefaultProcessorOptions, removeStaleWhenUpdated: true};
github.context.actor = 'abot'; github.context.actor = 'abot';

View File

@@ -177,11 +177,15 @@ inputs:
default: 'true' default: 'true'
required: false required: false
labels-to-add-when-unstale: labels-to-add-when-unstale:
description: 'A comma delimited list of labels to add when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.' description: 'A comma delimited list of labels to add when an issue or pull request becomes unstale.'
default: ''
required: false
labels-to-remove-when-stale:
description: 'A comma delimited list of labels to remove when an issue or pull request becomes stale.'
default: '' default: ''
required: false required: false
labels-to-remove-when-unstale: labels-to-remove-when-unstale:
description: 'A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.' description: 'A comma delimited list of labels to remove when an issue or pull request becomes unstale.'
default: '' default: ''
required: false required: false
ignore-updates: ignore-updates:

8912
dist/index.js vendored

File diff suppressed because one or more lines are too long

18210
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,10 +6,10 @@
"main": "lib/main.js", "main": "lib/main.js",
"scripts": { "scripts": {
"build": "tsc --project tsconfig.app.json && ncc build", "build": "tsc --project tsconfig.app.json && ncc build",
"format": "prettier --write --ignore-unknown **/*.{json,yml,ts}", "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write **/*.{ts,yml,yaml}",
"format-check": "prettier --check --ignore-unknown **/*.{json,yml,ts}", "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check **/*.{ts,yml,yaml}",
"lint": "eslint src/**/*.ts", "lint": "eslint --config ./.eslintrc.js **/*.ts",
"lint:fix": "eslint src/**/*.ts --fix", "lint:fix": "eslint --config ./.eslintrc.js **/*.ts --fix",
"lint:all": "npm run format-check && npm run lint", "lint:all": "npm run format-check && npm run lint",
"lint:all:fix": "npm run format && npm run lint:fix", "lint:all:fix": "npm run format && npm run lint:fix",
"test": "jest --config ./jest.config.js", "test": "jest --config ./jest.config.js",
@@ -31,37 +31,39 @@
"stale" "stale"
], ],
"engines": { "engines": {
"node": "12", "node": "16",
"npm": "6" "npm": ">=7.0.0 <10.0.0-0"
}, },
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/github": "^5.0.1", "@actions/github": "^5.1.1",
"@octokit/core": "^4.2.0",
"@octokit/plugin-retry": "^4.1.1",
"lodash.deburr": "^4.1.0", "lodash.deburr": "^4.1.0",
"semver": "^7.3.5" "semver": "^7.3.5"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.0.2", "@types/jest": "^29.5.0",
"@types/lodash.deburr": "^4.1.6", "@types/lodash.deburr": "^4.1.6",
"@types/node": "^15.0.2", "@types/node": "^18.15.3",
"@types/semver": "^7.3.5", "@types/semver": "^7.3.5",
"@typescript-eslint/eslint-plugin": "^4.31.1", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^4.31.1", "@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.28.6", "@vercel/ncc": "^0.36.1",
"ansi-styles": "5.2.0", "ansi-styles": "5.2.0",
"eslint": "^7.28.0", "eslint": "^8.35.0",
"eslint-plugin-github": "^4.1.2", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^25.3.2", "eslint-plugin-jest": "^27.2.1",
"jest": "^27.2.5", "jest": "^29.5.0",
"jest-circus": "^27.4.6", "jest-circus": "^29.3.1",
"jest-silent-reporter": "^0.5.0", "jest-silent-reporter": "^0.5.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"prettier": "^2.5.1", "prettier": "^2.8.6",
"standard-version": "^9.3.1", "standard-version": "^9.3.1",
"terminal-link": "^2.1.1", "terminal-link": "^2.1.1",
"ts-jest": "^27.1.2", "ts-jest": "^29.0.5",
"typescript": "^4.3.2" "typescript": "^5.0.2"
} }
} }

View File

@@ -1,3 +1,4 @@
/* eslint jest/no-identical-title: "off" */
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options'; import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options';
import {generateIIssue} from '../../__tests__/functions/generate-iissue'; import {generateIIssue} from '../../__tests__/functions/generate-iissue';
import {IIssue} from '../interfaces/issue'; import {IIssue} from '../interfaces/issue';

View File

@@ -56,6 +56,7 @@ describe('Issue', (): void => {
exemptAllIssueAssignees: undefined, exemptAllIssueAssignees: undefined,
exemptAllPrAssignees: undefined, exemptAllPrAssignees: undefined,
enableStatistics: false, enableStatistics: false,
labelsToRemoveWhenStale: '',
labelsToRemoveWhenUnstale: '', labelsToRemoveWhenUnstale: '',
labelsToAddWhenUnstale: '', labelsToAddWhenUnstale: '',
ignoreUpdates: false, ignoreUpdates: false,

View File

@@ -14,7 +14,7 @@ export class Issue implements IIssue {
created_at: IsoDateString; created_at: IsoDateString;
updated_at: IsoDateString; updated_at: IsoDateString;
readonly labels: ILabel[]; readonly labels: ILabel[];
readonly pull_request: Object | null | undefined; readonly pull_request: object | null | undefined;
readonly state: string | 'closed' | 'open'; readonly state: string | 'closed' | 'open';
readonly locked: boolean; readonly locked: boolean;
readonly milestone?: IMilestone | null; readonly milestone?: IMilestone | null;

View File

@@ -25,6 +25,7 @@ import {StaleOperations} from './stale-operations';
import {Statistics} from './statistics'; import {Statistics} from './statistics';
import {LoggerService} from '../services/logger.service'; import {LoggerService} from '../services/logger.service';
import {OctokitIssue} from '../interfaces/issue'; import {OctokitIssue} from '../interfaces/issue';
import {retry} from '@octokit/plugin-retry';
/*** /***
* Handle processing of issues for staleness/closure. * Handle processing of issues for staleness/closure.
@@ -74,7 +75,7 @@ export class IssuesProcessor {
constructor(options: IIssuesProcessorOptions) { constructor(options: IIssuesProcessorOptions) {
this.options = options; this.options = options;
this.client = getOctokit(this.options.repoToken); this.client = getOctokit(this.options.repoToken, undefined, retry);
this.operations = new StaleOperations(this.options); this.operations = new StaleOperations(this.options);
this._logger.info( this._logger.info(
@@ -122,6 +123,10 @@ export class IssuesProcessor {
); );
} }
const labelsToRemoveWhenStale: string[] = wordsToList(
this.options.labelsToRemoveWhenStale
);
const labelsToAddWhenUnstale: string[] = wordsToList( const labelsToAddWhenUnstale: string[] = wordsToList(
this.options.labelsToAddWhenUnstale this.options.labelsToAddWhenUnstale
); );
@@ -140,7 +145,8 @@ export class IssuesProcessor {
await this.processIssue( await this.processIssue(
issue, issue,
labelsToAddWhenUnstale, labelsToAddWhenUnstale,
labelsToRemoveWhenUnstale labelsToRemoveWhenUnstale,
labelsToRemoveWhenStale
); );
}); });
} }
@@ -178,7 +184,8 @@ export class IssuesProcessor {
async processIssue( async processIssue(
issue: Issue, issue: Issue,
labelsToAddWhenUnstale: Readonly<string>[], labelsToAddWhenUnstale: Readonly<string>[],
labelsToRemoveWhenUnstale: Readonly<string>[] labelsToRemoveWhenUnstale: Readonly<string>[],
labelsToRemoveWhenStale: Readonly<string>[]
): Promise<void> { ): Promise<void> {
this.statistics?.incrementProcessedItemsCount(issue); this.statistics?.incrementProcessedItemsCount(issue);
@@ -508,6 +515,7 @@ export class IssuesProcessor {
staleMessage, staleMessage,
labelsToAddWhenUnstale, labelsToAddWhenUnstale,
labelsToRemoveWhenUnstale, labelsToRemoveWhenUnstale,
labelsToRemoveWhenStale,
closeMessage, closeMessage,
closeLabel closeLabel
); );
@@ -556,8 +564,7 @@ export class IssuesProcessor {
(issue: Readonly<OctokitIssue>): Issue => new Issue(this.options, issue) (issue: Readonly<OctokitIssue>): Issue => new Issue(this.options, issue)
); );
} catch (error) { } catch (error) {
this._logger.error(`Get issues for repo error: ${error.message}`); throw Error(`Getting issues was blocked by the error: ${error.message}`);
return Promise.resolve([]);
} }
} }
@@ -623,6 +630,7 @@ export class IssuesProcessor {
staleMessage: string, staleMessage: string,
labelsToAddWhenUnstale: Readonly<string>[], labelsToAddWhenUnstale: Readonly<string>[],
labelsToRemoveWhenUnstale: Readonly<string>[], labelsToRemoveWhenUnstale: Readonly<string>[],
labelsToRemoveWhenStale: Readonly<string>[],
closeMessage?: string, closeMessage?: string,
closeLabel?: string closeLabel?: string
) { ) {
@@ -671,6 +679,11 @@ export class IssuesProcessor {
if (issue.markedStaleThisRun) { if (issue.markedStaleThisRun) {
issueLogger.info(`marked stale this run, so don't check for updates`); issueLogger.info(`marked stale this run, so don't check for updates`);
await this._removeLabelsOnStatusTransition(
issue,
labelsToRemoveWhenStale,
Option.LabelsToRemoveWhenStale
);
} }
// The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2) // The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2)
@@ -699,7 +712,11 @@ export class IssuesProcessor {
await this._removeStaleLabel(issue, staleLabel); await this._removeStaleLabel(issue, staleLabel);
// Are there labels to remove or add when an issue is no longer stale? // Are there labels to remove or add when an issue is no longer stale?
await this._removeLabelsWhenUnstale(issue, labelsToRemoveWhenUnstale); await this._removeLabelsOnStatusTransition(
issue,
labelsToRemoveWhenUnstale,
Option.LabelsToRemoveWhenUnstale
);
await this._addLabelsWhenUnstale(issue, labelsToAddWhenUnstale); await this._addLabelsWhenUnstale(issue, labelsToAddWhenUnstale);
issueLogger.info(`Skipping the process since the $$type is now un-stale`); issueLogger.info(`Skipping the process since the $$type is now un-stale`);
@@ -921,26 +938,41 @@ export class IssuesProcessor {
} }
const branch = pullRequest.head.ref; const branch = pullRequest.head.ref;
issueLogger.info(
`Deleting the branch "${LoggerService.cyan(branch)}" from closed $$type`
);
try { if (
this._consumeIssueOperation(issue); pullRequest.head.repo === null ||
this.statistics?.incrementDeletedBranchesCount(); pullRequest.head.repo.full_name ===
`${context.repo.owner}/${context.repo.repo}`
) {
issueLogger.info(
`Deleting the branch "${LoggerService.cyan(branch)}" from closed $$type`
);
if (!this.options.debugOnly) { try {
await this.client.rest.git.deleteRef({ this._consumeIssueOperation(issue);
owner: context.repo.owner, this.statistics?.incrementDeletedBranchesCount();
repo: context.repo.repo,
ref: `heads/${branch}` if (!this.options.debugOnly) {
}); await this.client.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branch}`
});
}
} catch (error) {
issueLogger.error(
`Error when deleting the branch "${LoggerService.cyan(
branch
)}" from $$type: ${error.message}`
);
} }
} catch (error) { } else {
issueLogger.error( issueLogger.warning(
`Error when deleting the branch "${LoggerService.cyan( `Deleting the branch "${LoggerService.cyan(
branch branch
)}" from $$type: ${error.message}` )}" has skipped because it belongs to other repo ${
pullRequest.head.repo.full_name
}`
); );
} }
} }
@@ -1059,9 +1091,10 @@ export class IssuesProcessor {
return this.options.removeStaleWhenUpdated; return this.options.removeStaleWhenUpdated;
} }
private async _removeLabelsWhenUnstale( private async _removeLabelsOnStatusTransition(
issue: Issue, issue: Issue,
removeLabels: Readonly<string>[] removeLabels: Readonly<string>[],
staleStatus: Option
): Promise<void> { ): Promise<void> {
if (!removeLabels.length) { if (!removeLabels.length) {
return; return;
@@ -1071,7 +1104,7 @@ export class IssuesProcessor {
issueLogger.info( issueLogger.info(
`Removing all the labels specified via the ${this._logger.createOptionLink( `Removing all the labels specified via the ${this._logger.createOptionLink(
Option.LabelsToRemoveWhenUnstale staleStatus
)} option.` )} option.`
); );

View File

@@ -41,6 +41,7 @@ export enum Option {
ExemptAllIssueAssignees = 'exempt-all-issue-assignees', ExemptAllIssueAssignees = 'exempt-all-issue-assignees',
ExemptAllPrAssignees = 'exempt-all-pr-assignees', ExemptAllPrAssignees = 'exempt-all-pr-assignees',
EnableStatistics = 'enable-statistics', EnableStatistics = 'enable-statistics',
LabelsToRemoveWhenStale = 'labels-to-remove-when-stale',
LabelsToRemoveWhenUnstale = 'labels-to-remove-when-unstale', LabelsToRemoveWhenUnstale = 'labels-to-remove-when-unstale',
LabelsToAddWhenUnstale = 'labels-to-add-when-unstale', LabelsToAddWhenUnstale = 'labels-to-add-when-unstale',
IgnoreUpdates = 'ignore-updates', IgnoreUpdates = 'ignore-updates',

View File

@@ -9,7 +9,7 @@ export interface IIssue {
created_at: IsoDateString; created_at: IsoDateString;
updated_at: IsoDateString; updated_at: IsoDateString;
labels: ILabel[]; labels: ILabel[];
pull_request?: Object | null; pull_request?: object | null;
state: string; state: string;
locked: boolean; locked: boolean;
milestone?: IMilestone | null; milestone?: IMilestone | null;

View File

@@ -45,6 +45,7 @@ export interface IIssuesProcessorOptions {
exemptAllIssueAssignees: boolean | undefined; exemptAllIssueAssignees: boolean | undefined;
exemptAllPrAssignees: boolean | undefined; exemptAllPrAssignees: boolean | undefined;
enableStatistics: boolean; enableStatistics: boolean;
labelsToRemoveWhenStale: string;
labelsToRemoveWhenUnstale: string; labelsToRemoveWhenUnstale: string;
labelsToAddWhenUnstale: string; labelsToAddWhenUnstale: string;
ignoreUpdates: boolean; ignoreUpdates: boolean;

View File

@@ -2,6 +2,9 @@ export interface IPullRequest {
number: number; number: number;
head: { head: {
ref: string; ref: string;
repo: {
full_name: string;
} | null;
}; };
draft?: boolean; draft?: boolean;
} }

View File

@@ -82,6 +82,7 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
exemptAllIssueAssignees: _toOptionalBoolean('exempt-all-issue-assignees'), exemptAllIssueAssignees: _toOptionalBoolean('exempt-all-issue-assignees'),
exemptAllPrAssignees: _toOptionalBoolean('exempt-all-pr-assignees'), exemptAllPrAssignees: _toOptionalBoolean('exempt-all-pr-assignees'),
enableStatistics: core.getInput('enable-statistics') === 'true', enableStatistics: core.getInput('enable-statistics') === 'true',
labelsToRemoveWhenStale: core.getInput('labels-to-remove-when-stale'),
labelsToRemoveWhenUnstale: core.getInput('labels-to-remove-when-unstale'), labelsToRemoveWhenUnstale: core.getInput('labels-to-remove-when-unstale'),
labelsToAddWhenUnstale: core.getInput('labels-to-add-when-unstale'), labelsToAddWhenUnstale: core.getInput('labels-to-add-when-unstale'),
ignoreUpdates: core.getInput('ignore-updates') === 'true', ignoreUpdates: core.getInput('ignore-updates') === 'true',

View File

@@ -5,7 +5,8 @@
"outDir": "./lib" /* Redirect output structure to the directory. */, "outDir": "./lib" /* Redirect output structure to the directory. */,
"strict": true /* Enable all strict type-checking options. */, "strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"useUnknownInCatchVariables": false /* Default catch clause variables as 'unknown' instead of 'any'. */
//"sourceMap": true //"sourceMap": true
}, },
"include": ["src", "__tests__"] "include": ["src", "__tests__"]