mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 04:27:34 +00:00
Compare commits
63 Commits
v5.0.0-bet
...
v4.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0967ca812e | ||
|
|
375538a703 | ||
|
|
8d17e8ac4c | ||
|
|
9d45a7438f | ||
|
|
130636aba5 | ||
|
|
54aeabf7b5 | ||
|
|
899595ff01 | ||
|
|
8056174ee0 | ||
|
|
7a202e6428 | ||
|
|
b5ff161cf0 | ||
|
|
fe87e601ad | ||
|
|
6fe556842d | ||
|
|
ed183b14dc | ||
|
|
ad1762f9ba | ||
|
|
96d00dc276 | ||
|
|
d817fadc81 | ||
|
|
3240e3059a | ||
|
|
1a5defcb60 | ||
|
|
af1100d56a | ||
|
|
673e3c17b7 | ||
|
|
092c82e551 | ||
|
|
9fcb2c2f55 | ||
|
|
0d06c50435 | ||
|
|
1d399c3ab6 | ||
|
|
82a4f6fc25 | ||
|
|
d40596e5db | ||
|
|
3cbc54c641 | ||
|
|
639ba81ab1 | ||
|
|
71d2484daa | ||
|
|
59d3310a72 | ||
|
|
a78a6c7eb7 | ||
|
|
54d434dac5 | ||
|
|
d07f38b87f | ||
|
|
e3b3815c8d | ||
|
|
673c7e22a7 | ||
|
|
44414dbc7d | ||
|
|
a27020c135 | ||
|
|
97762039fe | ||
|
|
60f44e7cf1 | ||
|
|
092c979868 | ||
|
|
cecbd94bd4 | ||
|
|
7fef7e3d17 | ||
|
|
0776a67936 | ||
|
|
08382d15cb | ||
|
|
d1dd326ccc | ||
|
|
91076827ed | ||
|
|
012b89238e | ||
|
|
a7cc8a62ef | ||
|
|
b28379f6ed | ||
|
|
b898cc8e29 | ||
|
|
4a96e771de | ||
|
|
305cfeb74c | ||
|
|
866eff55a5 | ||
|
|
b78dba3eb5 | ||
|
|
20251547f9 | ||
|
|
d89797c51d | ||
|
|
f3632d3e9f | ||
|
|
e05b7c1927 | ||
|
|
8b8677b4ce | ||
|
|
920e9b6169 | ||
|
|
409a5a2095 | ||
|
|
6a0b7265cb | ||
|
|
b0d9292064 |
@@ -7,7 +7,7 @@ module.exports = {
|
|||||||
'eslint-config-prettier'
|
'eslint-config-prettier'
|
||||||
],
|
],
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
plugins: ['@typescript-eslint', 'eslint-plugin-jest'],
|
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/no-require-imports': 'error',
|
'@typescript-eslint/no-require-imports': 'error',
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||||
@@ -28,7 +28,8 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
'no-control-regex': 'off',
|
'no-control-regex': 'off',
|
||||||
'no-constant-condition': ['error', {checkLoops: false}]
|
'no-constant-condition': ['error', {checkLoops: false}],
|
||||||
|
'node/no-extraneous-import': 'error'
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: "@octokit/openapi-types"
|
|||||||
version: 12.11.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:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
20
.licenses/npm/@octokit/openapi-types-18.0.0.dep.yml
generated
Normal file
20
.licenses/npm/@octokit/openapi-types-18.0.0.dep.yml
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@octokit/openapi-types"
|
||||||
|
version: 18.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: []
|
||||||
34
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
Normal file
34
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: "@octokit/plugin-retry"
|
||||||
|
version: 5.0.4
|
||||||
|
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: []
|
||||||
34
.licenses/npm/@octokit/request-error-4.0.2.dep.yml
generated
Normal file
34
.licenses/npm/@octokit/request-error-4.0.2.dep.yml
generated
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: "@octokit/request-error"
|
||||||
|
version: 4.0.2
|
||||||
|
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: []
|
||||||
20
.licenses/npm/@octokit/types-10.0.0.dep.yml
generated
Normal file
20
.licenses/npm/@octokit/types-10.0.0.dep.yml
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@octokit/types"
|
||||||
|
version: 10.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: []
|
||||||
@@ -3,7 +3,7 @@ name: "@octokit/types"
|
|||||||
version: 6.41.0
|
version: 6.41.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Shared TypeScript definitions for Octokit projects
|
summary: Shared TypeScript definitions for Octokit projects
|
||||||
homepage:
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
31
.licenses/npm/bottleneck.dep.yml
generated
Normal file
31
.licenses/npm/bottleneck.dep.yml
generated
Normal 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: []
|
||||||
100
README.md
100
README.md
@@ -10,7 +10,7 @@ Automatically label new pull requests based on the paths of files being changed.
|
|||||||
|
|
||||||
Create a `.github/labeler.yml` file with a list of labels and [minimatch](https://github.com/isaacs/minimatch) globs to match to apply the label.
|
Create a `.github/labeler.yml` file with a list of labels and [minimatch](https://github.com/isaacs/minimatch) globs to match to apply the label.
|
||||||
|
|
||||||
The key is the name of the label in your repository that you want to add (eg: "merge conflict", "needs-updating") and the value is the path (glob) of the changed files (eg: `src/**/*`, `tests/*.spec.js`) or a match object.
|
The key is the name of the label in your repository that you want to add (e.g. `merge conflict`, `needs-updating`) and the value is the path (glob) of the changed files (e.g. `src/**`, `tests/*.spec.js`) or a match object.
|
||||||
|
|
||||||
#### Match Object
|
#### Match Object
|
||||||
|
|
||||||
@@ -40,12 +40,17 @@ label1:
|
|||||||
|
|
||||||
From a boolean logic perspective, top-level match objects are `OR`-ed together and individual match rules within an object are `AND`-ed. Combined with `!` negation, you can write complex matching rules.
|
From a boolean logic perspective, top-level match objects are `OR`-ed together and individual match rules within an object are `AND`-ed. Combined with `!` negation, you can write complex matching rules.
|
||||||
|
|
||||||
|
> ⚠️ This action uses [minimatch](https://www.npmjs.com/package/minimatch) to apply glob patterns.
|
||||||
|
> For historical reasons, paths starting with dot (e.g. `.github`) are not matched by default.
|
||||||
|
> You need to set `dot: true` to change this behavior.
|
||||||
|
> See [Inputs](#inputs) table below for details.
|
||||||
|
|
||||||
#### Basic Examples
|
#### Basic Examples
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
# Add 'label1' to any changes within 'example' folder or any subfolders
|
# Add 'label1' to any changes within 'example' folder or any subfolders
|
||||||
label1:
|
label1:
|
||||||
- example/**/*
|
- example/**
|
||||||
|
|
||||||
# Add 'label2' to any file changes within 'example2' folder
|
# Add 'label2' to any file changes within 'example2' folder
|
||||||
label2: example2/*
|
label2: example2/*
|
||||||
@@ -65,8 +70,7 @@ repo:
|
|||||||
|
|
||||||
# Add '@domain/core' label to any change within the 'core' package
|
# Add '@domain/core' label to any change within the 'core' package
|
||||||
'@domain/core':
|
'@domain/core':
|
||||||
- package/core/*
|
- package/core/**
|
||||||
- package/core/**/*
|
|
||||||
|
|
||||||
# Add 'test' label to any change to *.spec.js files within the source dir
|
# Add 'test' label to any change to *.spec.js files within the source dir
|
||||||
test:
|
test:
|
||||||
@@ -74,7 +78,7 @@ test:
|
|||||||
|
|
||||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||||
source:
|
source:
|
||||||
- any: ['src/**/*', '!src/docs/*']
|
- any: ['src/**', '!src/docs/*']
|
||||||
|
|
||||||
# Add 'frontend` label to any change to *.js files as long as the `main.js` hasn't changed
|
# Add 'frontend` label to any change to *.js files as long as the `main.js` hasn't changed
|
||||||
frontend:
|
frontend:
|
||||||
@@ -84,7 +88,7 @@ frontend:
|
|||||||
|
|
||||||
### Create Workflow
|
### Create Workflow
|
||||||
|
|
||||||
Create a workflow (eg: `.github/workflows/labeler.yml` see [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) to utilize the labeler action with content:
|
Create a workflow (e.g. `.github/workflows/labeler.yml` see [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) to utilize the labeler action with content:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: "Pull Request Labeler"
|
name: "Pull Request Labeler"
|
||||||
@@ -105,12 +109,84 @@ jobs:
|
|||||||
|
|
||||||
Various inputs are defined in [`action.yml`](action.yml) to let you configure the labeler:
|
Various inputs are defined in [`action.yml`](action.yml) to let you configure the labeler:
|
||||||
|
|
||||||
| Name | Description | Default |
|
| Name | Description | Default |
|
||||||
| - | - | - |
|
|----------------------|-------------------------------------------------------------------------------------------------|-----------------------|
|
||||||
| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret, with `contents:read` and `pull-requests:write` access | `github.token` |
|
| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret | N/A |
|
||||||
| `configuration-path` | The path to the label configuration file | `.github/labeler.yml` |
|
| `configuration-path` | The path to the label configuration file | `.github/labeler.yml` |
|
||||||
| `sync-labels` | Whether or not to remove labels when matching files are reverted or no longer changed by the PR | `false`|
|
| `sync-labels` | Whether or not to remove labels when matching files are reverted or no longer changed by the PR | `false` |
|
||||||
|
| `dot` | Whether or not to auto-include paths starting with dot (e.g. `.github`) | `false` |
|
||||||
|
|
||||||
# Contributions
|
When `dot` is disabled and you want to include _all_ files in a folder:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
label1:
|
||||||
|
- path/to/folder/**/*
|
||||||
|
- path/to/folder/**/.*
|
||||||
|
```
|
||||||
|
|
||||||
|
If `dot` is enabled:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
label1:
|
||||||
|
- path/to/folder/**
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Outputs
|
||||||
|
|
||||||
|
Labeler provides the following outputs:
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
|--------------|-----------------------------------------------------------|
|
||||||
|
| `new-labels` | A comma-separated list of all new labels |
|
||||||
|
| `all-labels` | A comma-separated list of all labels that the PR contains |
|
||||||
|
|
||||||
|
The following example performs steps based on the output of labeler:
|
||||||
|
```yml
|
||||||
|
name: "My workflow"
|
||||||
|
on:
|
||||||
|
- pull_request_target
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- id: label-the-PR
|
||||||
|
uses: actions/labeler@v3
|
||||||
|
|
||||||
|
- id: run-frontend-tests
|
||||||
|
if: contains(fromJson(steps.label-the-PR.outputs.all-labels), 'frontend')
|
||||||
|
run: |
|
||||||
|
echo "Running frontend tests..."
|
||||||
|
# Put your commands for running frontend tests here
|
||||||
|
|
||||||
|
- id: run-backend-tests
|
||||||
|
if: contains(fromJson(steps.label-the-PR.outputs.all-labels), 'backend')
|
||||||
|
run: |
|
||||||
|
echo "Running backend tests..."
|
||||||
|
# Put your commands for running backend tests here
|
||||||
|
```
|
||||||
|
|
||||||
|
## Permissions
|
||||||
|
|
||||||
|
In order to add labels to pull requests, the GitHub labeler action requires
|
||||||
|
write permissions on the pull-request. However, when the action runs on a pull
|
||||||
|
request from a forked repository, GitHub only grants read access tokens for
|
||||||
|
`pull_request` events, at most. If you encounter an `Error: HttpError: Resource
|
||||||
|
not accessible by integration`, it's likely due to these permission constraints.
|
||||||
|
To resolve this issue, you can modify the `on:` section of your workflow to use
|
||||||
|
[`pull_request_target`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target)
|
||||||
|
instead of `pull_request` (see example [above](#create-workflow)). This change
|
||||||
|
allows the action to have write access, because `pull_request_target` alters the
|
||||||
|
[context of the
|
||||||
|
action](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target)
|
||||||
|
and safely grants additional permissions. Refer to the [GitHub token
|
||||||
|
permissions
|
||||||
|
documentation](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
|
||||||
|
for more details about access levels and event contexts.
|
||||||
|
|
||||||
|
## Contributions
|
||||||
|
|
||||||
Contributions are welcome! See the [Contributor's Guide](CONTRIBUTING.md).
|
Contributions are welcome! See the [Contributor's Guide](CONTRIBUTING.md).
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ export const context = {
|
|||||||
const mockApi = {
|
const mockApi = {
|
||||||
rest: {
|
rest: {
|
||||||
issues: {
|
issues: {
|
||||||
addLabels: jest.fn(),
|
setLabels: jest.fn()
|
||||||
removeLabel: jest.fn()
|
|
||||||
},
|
},
|
||||||
pulls: {
|
pulls: {
|
||||||
get: jest.fn().mockResolvedValue({}),
|
get: jest.fn().mockResolvedValue({}),
|
||||||
|
|||||||
@@ -15,15 +15,29 @@ const matchConfig = [{any: ['*.txt']}];
|
|||||||
describe('checkGlobs', () => {
|
describe('checkGlobs', () => {
|
||||||
it('returns true when our pattern does match changed files', () => {
|
it('returns true when our pattern does match changed files', () => {
|
||||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||||
const result = checkGlobs(changedFiles, matchConfig);
|
const result = checkGlobs(changedFiles, matchConfig, false);
|
||||||
|
|
||||||
expect(result).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns false when our pattern does not match changed files', () => {
|
it('returns false when our pattern does not match changed files', () => {
|
||||||
const changedFiles = ['foo.docx'];
|
const changedFiles = ['foo.docx'];
|
||||||
const result = checkGlobs(changedFiles, matchConfig);
|
const result = checkGlobs(changedFiles, matchConfig, false);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns false for a file starting with dot if `dot` option is false', () => {
|
||||||
|
const changedFiles = ['.foo.txt'];
|
||||||
|
const result = checkGlobs(changedFiles, matchConfig, false);
|
||||||
|
|
||||||
|
expect(result).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns true for a file starting with dot if `dot` option is true', () => {
|
||||||
|
const changedFiles = ['.foo.txt'];
|
||||||
|
const result = checkGlobs(changedFiles, matchConfig, true);
|
||||||
|
|
||||||
|
expect(result).toBeTruthy();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,99 +8,206 @@ jest.mock('@actions/core');
|
|||||||
jest.mock('@actions/github');
|
jest.mock('@actions/github');
|
||||||
|
|
||||||
const gh = github.getOctokit('_');
|
const gh = github.getOctokit('_');
|
||||||
const addLabelsMock = jest.spyOn(gh.rest.issues, 'addLabels');
|
const setLabelsMock = jest.spyOn(gh.rest.issues, 'setLabels');
|
||||||
const removeLabelMock = jest.spyOn(gh.rest.issues, 'removeLabel');
|
|
||||||
const reposMock = jest.spyOn(gh.rest.repos, 'getContent');
|
const reposMock = jest.spyOn(gh.rest.repos, 'getContent');
|
||||||
const paginateMock = jest.spyOn(gh, 'paginate');
|
const paginateMock = jest.spyOn(gh, 'paginate');
|
||||||
const getPullMock = jest.spyOn(gh.rest.pulls, 'get');
|
const getPullMock = jest.spyOn(gh.rest.pulls, 'get');
|
||||||
|
const coreWarningMock = jest.spyOn(core, 'warning');
|
||||||
|
const setOutputSpy = jest.spyOn(core, 'setOutput');
|
||||||
|
|
||||||
const yamlFixtures = {
|
const yamlFixtures = {
|
||||||
'only_pdfs.yml': fs.readFileSync('__tests__/fixtures/only_pdfs.yml')
|
'only_pdfs.yml': fs.readFileSync('__tests__/fixtures/only_pdfs.yml')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const configureInput = (
|
||||||
|
mockInput: Partial<{
|
||||||
|
'repo-token': string;
|
||||||
|
'configuration-path': string;
|
||||||
|
'sync-labels': boolean;
|
||||||
|
dot: boolean;
|
||||||
|
}>
|
||||||
|
) => {
|
||||||
|
jest
|
||||||
|
.spyOn(core, 'getInput')
|
||||||
|
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
||||||
|
jest
|
||||||
|
.spyOn(core, 'getBooleanInput')
|
||||||
|
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
||||||
|
};
|
||||||
|
|
||||||
afterAll(() => jest.restoreAllMocks());
|
afterAll(() => jest.restoreAllMocks());
|
||||||
|
|
||||||
describe('run', () => {
|
describe('run', () => {
|
||||||
it('adds labels to PRs that match our glob patterns', async () => {
|
it('(with dot: false) adds labels to PRs that match our glob patterns', async () => {
|
||||||
|
configureInput({});
|
||||||
usingLabelerConfigYaml('only_pdfs.yml');
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
mockGitHubResponseChangedFiles('foo.pdf');
|
mockGitHubResponseChangedFiles('foo.pdf');
|
||||||
|
getPullMock.mockResolvedValue(<any>{
|
||||||
|
data: {
|
||||||
|
labels: []
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
expect(removeLabelMock).toHaveBeenCalledTimes(0);
|
expect(setLabelsMock).toHaveBeenCalledTimes(1);
|
||||||
expect(addLabelsMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(addLabelsMock).toHaveBeenCalledWith({
|
expect(setLabelsMock).toHaveBeenCalledWith({
|
||||||
owner: 'monalisa',
|
owner: 'monalisa',
|
||||||
repo: 'helloworld',
|
repo: 'helloworld',
|
||||||
issue_number: 123,
|
issue_number: 123,
|
||||||
labels: ['touched-a-pdf-file']
|
labels: ['touched-a-pdf-file']
|
||||||
});
|
});
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith(
|
||||||
|
'new-labels',
|
||||||
|
'touched-a-pdf-file'
|
||||||
|
);
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith(
|
||||||
|
'all-labels',
|
||||||
|
'touched-a-pdf-file'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not add labels to PRs that do not match our glob patterns', async () => {
|
it('(with dot: true) adds labels to PRs that match our glob patterns', async () => {
|
||||||
|
configureInput({dot: true});
|
||||||
usingLabelerConfigYaml('only_pdfs.yml');
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
mockGitHubResponseChangedFiles('foo.txt');
|
mockGitHubResponseChangedFiles('.foo.pdf');
|
||||||
|
|
||||||
await run();
|
|
||||||
|
|
||||||
expect(removeLabelMock).toHaveBeenCalledTimes(0);
|
|
||||||
expect(addLabelsMock).toHaveBeenCalledTimes(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('(with sync-labels: true) it deletes preexisting PR labels that no longer match the glob pattern', async () => {
|
|
||||||
const mockInput = {
|
|
||||||
'repo-token': 'foo',
|
|
||||||
'configuration-path': 'bar',
|
|
||||||
'sync-labels': true
|
|
||||||
};
|
|
||||||
|
|
||||||
jest
|
|
||||||
.spyOn(core, 'getInput')
|
|
||||||
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
|
||||||
|
|
||||||
usingLabelerConfigYaml('only_pdfs.yml');
|
|
||||||
mockGitHubResponseChangedFiles('foo.txt');
|
|
||||||
getPullMock.mockResolvedValue(<any>{
|
getPullMock.mockResolvedValue(<any>{
|
||||||
data: {
|
data: {
|
||||||
labels: [{name: 'touched-a-pdf-file'}]
|
labels: []
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
expect(addLabelsMock).toHaveBeenCalledTimes(0);
|
expect(setLabelsMock).toHaveBeenCalledTimes(1);
|
||||||
expect(removeLabelMock).toHaveBeenCalledTimes(1);
|
expect(setLabelsMock).toHaveBeenCalledWith({
|
||||||
expect(removeLabelMock).toHaveBeenCalledWith({
|
|
||||||
owner: 'monalisa',
|
owner: 'monalisa',
|
||||||
repo: 'helloworld',
|
repo: 'helloworld',
|
||||||
issue_number: 123,
|
issue_number: 123,
|
||||||
name: 'touched-a-pdf-file'
|
labels: ['touched-a-pdf-file']
|
||||||
});
|
});
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith(
|
||||||
|
'new-labels',
|
||||||
|
'touched-a-pdf-file'
|
||||||
|
);
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith(
|
||||||
|
'all-labels',
|
||||||
|
'touched-a-pdf-file'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('(with sync-labels: false) it issues no delete calls even when there are preexisting PR labels that no longer match the glob pattern', async () => {
|
it('(with dot: false) does not add labels to PRs that do not match our glob patterns', async () => {
|
||||||
const mockInput = {
|
configureInput({});
|
||||||
'repo-token': 'foo',
|
|
||||||
'configuration-path': 'bar',
|
|
||||||
'sync-labels': false
|
|
||||||
};
|
|
||||||
|
|
||||||
jest
|
|
||||||
.spyOn(core, 'getInput')
|
|
||||||
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
|
||||||
|
|
||||||
usingLabelerConfigYaml('only_pdfs.yml');
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
mockGitHubResponseChangedFiles('foo.txt');
|
mockGitHubResponseChangedFiles('.foo.pdf');
|
||||||
getPullMock.mockResolvedValue(<any>{
|
getPullMock.mockResolvedValue(<any>{
|
||||||
data: {
|
data: {
|
||||||
labels: [{name: 'touched-a-pdf-file'}]
|
labels: []
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
expect(addLabelsMock).toHaveBeenCalledTimes(0);
|
expect(setLabelsMock).toHaveBeenCalledTimes(0);
|
||||||
expect(removeLabelMock).toHaveBeenCalledTimes(0);
|
expect(setOutputSpy).toHaveBeenCalledWith('new-labels', '');
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('all-labels', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('(with dot: true) does not add labels to PRs that do not match our glob patterns', async () => {
|
||||||
|
configureInput({dot: true});
|
||||||
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
|
mockGitHubResponseChangedFiles('foo.txt');
|
||||||
|
|
||||||
|
await run();
|
||||||
|
|
||||||
|
expect(setLabelsMock).toHaveBeenCalledTimes(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('(with sync-labels: true) it deletes preexisting PR labels that no longer match the glob pattern', async () => {
|
||||||
|
configureInput({
|
||||||
|
'repo-token': 'foo',
|
||||||
|
'configuration-path': 'bar',
|
||||||
|
'sync-labels': true
|
||||||
|
});
|
||||||
|
|
||||||
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
|
mockGitHubResponseChangedFiles('foo.txt');
|
||||||
|
getPullMock.mockResolvedValue(<any>{
|
||||||
|
data: {
|
||||||
|
labels: [{name: 'touched-a-pdf-file'}, {name: 'manually-added'}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await run();
|
||||||
|
|
||||||
|
expect(setLabelsMock).toHaveBeenCalledTimes(1);
|
||||||
|
expect(setLabelsMock).toHaveBeenCalledWith({
|
||||||
|
owner: 'monalisa',
|
||||||
|
repo: 'helloworld',
|
||||||
|
issue_number: 123,
|
||||||
|
labels: ['manually-added']
|
||||||
|
});
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('new-labels', '');
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('all-labels', 'manually-added');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('(with sync-labels: false) it issues no delete calls even when there are preexisting PR labels that no longer match the glob pattern', async () => {
|
||||||
|
configureInput({
|
||||||
|
'repo-token': 'foo',
|
||||||
|
'configuration-path': 'bar',
|
||||||
|
'sync-labels': false
|
||||||
|
});
|
||||||
|
|
||||||
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
|
mockGitHubResponseChangedFiles('foo.txt');
|
||||||
|
getPullMock.mockResolvedValue(<any>{
|
||||||
|
data: {
|
||||||
|
labels: [{name: 'touched-a-pdf-file'}, {name: 'manually-added'}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await run();
|
||||||
|
|
||||||
|
expect(setLabelsMock).toHaveBeenCalledTimes(0);
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('new-labels', '');
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith(
|
||||||
|
'all-labels',
|
||||||
|
'touched-a-pdf-file,manually-added'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('(with sync-labels: false) it only logs the excess labels', async () => {
|
||||||
|
configureInput({
|
||||||
|
'repo-token': 'foo',
|
||||||
|
'configuration-path': 'bar',
|
||||||
|
'sync-labels': false
|
||||||
|
});
|
||||||
|
|
||||||
|
usingLabelerConfigYaml('only_pdfs.yml');
|
||||||
|
mockGitHubResponseChangedFiles('foo.pdf');
|
||||||
|
|
||||||
|
const existingLabels = Array.from({length: 100}).map((_, idx) => ({
|
||||||
|
name: `existing-label-${idx}`
|
||||||
|
}));
|
||||||
|
getPullMock.mockResolvedValue(<any>{
|
||||||
|
data: {
|
||||||
|
labels: existingLabels
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await run();
|
||||||
|
|
||||||
|
expect(setLabelsMock).toHaveBeenCalledTimes(0);
|
||||||
|
|
||||||
|
expect(coreWarningMock).toHaveBeenCalledTimes(1);
|
||||||
|
expect(coreWarningMock).toHaveBeenCalledWith(
|
||||||
|
'Maximum of 100 labels allowed. Excess labels: touched-a-pdf-file',
|
||||||
|
{title: 'Label limit for a PR exceeded'}
|
||||||
|
);
|
||||||
|
const allLabels: string = existingLabels.map(i => i.name).join(',');
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('new-labels', '');
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledWith('all-labels', allLabels);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,16 @@ inputs:
|
|||||||
description: 'Whether or not to remove labels when matching files are reverted'
|
description: 'Whether or not to remove labels when matching files are reverted'
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
|
dot:
|
||||||
|
description: 'Whether or not to auto-include paths starting with dot (e.g. `.github`)'
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
new-labels:
|
||||||
|
description: 'A comma-separated list of all new labels'
|
||||||
|
all-labels:
|
||||||
|
description: 'A comma-separated list of all labels that the PR contains'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
1833
dist/index.js
vendored
1833
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
497
package-lock.json
generated
497
package-lock.json
generated
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "labeler",
|
"name": "labeler",
|
||||||
"version": "4.0.1",
|
"version": "4.1.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "labeler",
|
"name": "labeler",
|
||||||
"version": "4.0.1",
|
"version": "4.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
|
"@octokit/plugin-retry": "^5.0.4",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"minimatch": "^7.4.3"
|
"minimatch": "^7.4.3"
|
||||||
},
|
},
|
||||||
@@ -19,12 +20,13 @@
|
|||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/minimatch": "^5.1.2",
|
"@types/minimatch": "^5.1.2",
|
||||||
"@types/node": "^16.11.7",
|
"@types/node": "^16.11.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||||
"@typescript-eslint/parser": "^5.59.7",
|
"@typescript-eslint/parser": "^5.60.1",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"eslint": "^8.41.0",
|
"eslint": "^8.43.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.2.2",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^27.5.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
@@ -720,18 +722,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.41.0",
|
"version": "8.43.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz",
|
||||||
"integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==",
|
"integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.11.8",
|
"version": "0.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
||||||
"integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
|
"integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanwhocodes/object-schema": "^1.2.1",
|
"@humanwhocodes/object-schema": "^1.2.1",
|
||||||
@@ -1222,6 +1224,48 @@
|
|||||||
"@octokit/core": ">=3"
|
"@octokit/core": ">=3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry": {
|
||||||
|
"version": "5.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-5.0.4.tgz",
|
||||||
|
"integrity": "sha512-hw00fDIhOgijy4aSxS6weWF5uqZVeoiC/AptLLyjL8KFCJRGRaXfcfgj76h/Z3cSLTjRsEIQnNCTig8INttL/g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/request-error": "^4.0.1",
|
||||||
|
"@octokit/types": "^10.0.0",
|
||||||
|
"bottleneck": "^2.15.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": ">=3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
|
||||||
|
"integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry/node_modules/@octokit/request-error": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-uqwUEmZw3x4I9DGYq9fODVAAvcLsPQv97NRycP6syEFu5916M189VnNBW2zANNwqg3OiligNcAey7P0SET843w==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^10.0.0",
|
||||||
|
"deprecation": "^2.0.0",
|
||||||
|
"once": "^1.4.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
|
||||||
|
"version": "10.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz",
|
||||||
|
"integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "5.6.3",
|
"version": "5.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||||
@@ -1422,15 +1466,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz",
|
||||||
"integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==",
|
"integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/type-utils": "5.59.7",
|
"@typescript-eslint/type-utils": "5.60.1",
|
||||||
"@typescript-eslint/utils": "5.59.7",
|
"@typescript-eslint/utils": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
@@ -1489,14 +1533,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz",
|
||||||
"integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==",
|
"integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1516,13 +1560,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz",
|
||||||
"integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==",
|
"integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.7"
|
"@typescript-eslint/visitor-keys": "5.60.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -1533,13 +1577,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz",
|
||||||
"integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==",
|
"integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"@typescript-eslint/utils": "5.59.7",
|
"@typescript-eslint/utils": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
},
|
},
|
||||||
@@ -1560,9 +1604,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz",
|
||||||
"integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==",
|
"integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -1573,13 +1617,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz",
|
||||||
"integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==",
|
"integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.7",
|
"@typescript-eslint/visitor-keys": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -1612,9 +1656,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
||||||
"version": "7.5.1",
|
"version": "7.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
|
||||||
"integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
|
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -1633,17 +1677,17 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz",
|
||||||
"integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==",
|
"integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@types/semver": "^7.3.12",
|
"@types/semver": "^7.3.12",
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"semver": "^7.3.7"
|
"semver": "^7.3.7"
|
||||||
},
|
},
|
||||||
@@ -1692,12 +1736,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz",
|
||||||
"integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==",
|
"integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1977,6 +2021,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/bottleneck": {
|
||||||
|
"version": "2.19.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
|
||||||
|
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
|
||||||
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||||
@@ -2454,16 +2503,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.41.0",
|
"version": "8.43.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz",
|
||||||
"integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==",
|
"integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@eslint/eslintrc": "^2.0.3",
|
"@eslint/eslintrc": "^2.0.3",
|
||||||
"@eslint/js": "8.41.0",
|
"@eslint/js": "8.43.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.8",
|
"@humanwhocodes/config-array": "^0.11.10",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
@@ -2521,10 +2570,29 @@
|
|||||||
"eslint": ">=7.0.0"
|
"eslint": ">=7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-es": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"eslint-utils": "^2.0.0",
|
||||||
|
"regexpp": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.10.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/mysticatea"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": ">=4.19.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-plugin-jest": {
|
"node_modules/eslint-plugin-jest": {
|
||||||
"version": "27.2.1",
|
"version": "27.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.2.tgz",
|
||||||
"integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==",
|
"integrity": "sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/utils": "^5.10.0"
|
"@typescript-eslint/utils": "^5.10.0"
|
||||||
@@ -2534,7 +2602,8 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^7.0.0 || ^8.0.0",
|
||||||
|
"jest": "*"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
@@ -2545,6 +2614,48 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-node": {
|
||||||
|
"version": "11.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
|
||||||
|
"integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"eslint-plugin-es": "^3.0.0",
|
||||||
|
"eslint-utils": "^2.0.0",
|
||||||
|
"ignore": "^5.1.1",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"resolve": "^1.10.1",
|
||||||
|
"semver": "^6.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.10.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": ">=5.16.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-node/node_modules/brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-node/node_modules/minimatch": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-scope": {
|
"node_modules/eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
@@ -2567,6 +2678,30 @@
|
|||||||
"node": ">=4.0"
|
"node": ">=4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-utils": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/mysticatea"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-visitor-keys": {
|
"node_modules/eslint-visitor-keys": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
@@ -4858,6 +4993,18 @@
|
|||||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/regexpp": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/mysticatea"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/require-directory": {
|
"node_modules/require-directory": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||||
@@ -6293,15 +6440,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@eslint/js": {
|
"@eslint/js": {
|
||||||
"version": "8.41.0",
|
"version": "8.43.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz",
|
||||||
"integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==",
|
"integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@humanwhocodes/config-array": {
|
"@humanwhocodes/config-array": {
|
||||||
"version": "0.11.8",
|
"version": "0.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
||||||
"integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
|
"integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@humanwhocodes/object-schema": "^1.2.1",
|
"@humanwhocodes/object-schema": "^1.2.1",
|
||||||
@@ -6701,6 +6848,41 @@
|
|||||||
"deprecation": "^2.3.1"
|
"deprecation": "^2.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@octokit/plugin-retry": {
|
||||||
|
"version": "5.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-5.0.4.tgz",
|
||||||
|
"integrity": "sha512-hw00fDIhOgijy4aSxS6weWF5uqZVeoiC/AptLLyjL8KFCJRGRaXfcfgj76h/Z3cSLTjRsEIQnNCTig8INttL/g==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/request-error": "^4.0.1",
|
||||||
|
"@octokit/types": "^10.0.0",
|
||||||
|
"bottleneck": "^2.15.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
|
||||||
|
"integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
|
||||||
|
},
|
||||||
|
"@octokit/request-error": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-uqwUEmZw3x4I9DGYq9fODVAAvcLsPQv97NRycP6syEFu5916M189VnNBW2zANNwqg3OiligNcAey7P0SET843w==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^10.0.0",
|
||||||
|
"deprecation": "^2.0.0",
|
||||||
|
"once": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "10.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz",
|
||||||
|
"integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^18.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@octokit/request": {
|
"@octokit/request": {
|
||||||
"version": "5.6.3",
|
"version": "5.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||||
@@ -6898,15 +7080,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz",
|
||||||
"integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==",
|
"integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/type-utils": "5.59.7",
|
"@typescript-eslint/type-utils": "5.60.1",
|
||||||
"@typescript-eslint/utils": "5.59.7",
|
"@typescript-eslint/utils": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
@@ -6942,53 +7124,53 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz",
|
||||||
"integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==",
|
"integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz",
|
||||||
"integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==",
|
"integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.7"
|
"@typescript-eslint/visitor-keys": "5.60.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/type-utils": {
|
"@typescript-eslint/type-utils": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz",
|
||||||
"integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==",
|
"integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"@typescript-eslint/utils": "5.59.7",
|
"@typescript-eslint/utils": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz",
|
||||||
"integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==",
|
"integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz",
|
||||||
"integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==",
|
"integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.7",
|
"@typescript-eslint/visitor-keys": "5.60.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -7006,9 +7188,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "7.5.1",
|
"version": "7.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
|
||||||
"integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
|
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -7023,17 +7205,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/utils": {
|
"@typescript-eslint/utils": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz",
|
||||||
"integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==",
|
"integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@types/semver": "^7.3.12",
|
"@types/semver": "^7.3.12",
|
||||||
"@typescript-eslint/scope-manager": "5.59.7",
|
"@typescript-eslint/scope-manager": "5.60.1",
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.7",
|
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"semver": "^7.3.7"
|
"semver": "^7.3.7"
|
||||||
},
|
},
|
||||||
@@ -7065,12 +7247,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.59.7",
|
"version": "5.60.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz",
|
||||||
"integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==",
|
"integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.7",
|
"@typescript-eslint/types": "5.60.1",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -7276,6 +7458,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
||||||
},
|
},
|
||||||
|
"bottleneck": {
|
||||||
|
"version": "2.19.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
|
||||||
|
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
|
||||||
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||||
@@ -7629,16 +7816,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "8.41.0",
|
"version": "8.43.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz",
|
||||||
"integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==",
|
"integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@eslint/eslintrc": "^2.0.3",
|
"@eslint/eslintrc": "^2.0.3",
|
||||||
"@eslint/js": "8.41.0",
|
"@eslint/js": "8.43.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.8",
|
"@humanwhocodes/config-array": "^0.11.10",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
@@ -7810,15 +7997,60 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-es": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-utils": "^2.0.0",
|
||||||
|
"regexpp": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-jest": {
|
"eslint-plugin-jest": {
|
||||||
"version": "27.2.1",
|
"version": "27.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.2.tgz",
|
||||||
"integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==",
|
"integrity": "sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/utils": "^5.10.0"
|
"@typescript-eslint/utils": "^5.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-node": {
|
||||||
|
"version": "11.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
|
||||||
|
"integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-plugin-es": "^3.0.0",
|
||||||
|
"eslint-utils": "^2.0.0",
|
||||||
|
"ignore": "^5.1.1",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"resolve": "^1.10.1",
|
||||||
|
"semver": "^6.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-scope": {
|
"eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
@@ -7837,6 +8069,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-utils": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eslint-visitor-keys": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-visitor-keys": {
|
"eslint-visitor-keys": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
@@ -9434,6 +9683,12 @@
|
|||||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"regexpp": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"require-directory": {
|
"require-directory": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "labeler",
|
"name": "labeler",
|
||||||
"version": "4.0.1",
|
"version": "4.1.0",
|
||||||
"description": "Labels pull requests by files altered",
|
"description": "Labels pull requests by files altered",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
|
"@octokit/plugin-retry": "^5.0.4",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"minimatch": "^7.4.3"
|
"minimatch": "^7.4.3"
|
||||||
},
|
},
|
||||||
@@ -34,12 +35,13 @@
|
|||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/minimatch": "^5.1.2",
|
"@types/minimatch": "^5.1.2",
|
||||||
"@types/node": "^16.11.7",
|
"@types/node": "^16.11.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||||
"@typescript-eslint/parser": "^5.59.7",
|
"@typescript-eslint/parser": "^5.60.1",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"eslint": "^8.41.0",
|
"eslint": "^8.43.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.2.2",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^27.5.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
|
|||||||
119
src/labeler.ts
119
src/labeler.ts
@@ -1,5 +1,6 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
|
import * as pluginRetry from '@octokit/plugin-retry';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import {Minimatch} from 'minimatch';
|
import {Minimatch} from 'minimatch';
|
||||||
|
|
||||||
@@ -11,11 +12,15 @@ interface MatchConfig {
|
|||||||
type StringOrMatchConfig = string | MatchConfig;
|
type StringOrMatchConfig = string | MatchConfig;
|
||||||
type ClientType = ReturnType<typeof github.getOctokit>;
|
type ClientType = ReturnType<typeof github.getOctokit>;
|
||||||
|
|
||||||
|
// GitHub Issues cannot have more than 100 labels
|
||||||
|
const GITHUB_MAX_LABELS = 100;
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
try {
|
try {
|
||||||
const token = core.getInput('repo-token');
|
const token = core.getInput('repo-token');
|
||||||
const configPath = core.getInput('configuration-path', {required: true});
|
const configPath = core.getInput('configuration-path', {required: true});
|
||||||
const syncLabels = !!core.getInput('sync-labels', {required: false});
|
const syncLabels = !!core.getInput('sync-labels');
|
||||||
|
const dot = core.getBooleanInput('dot');
|
||||||
|
|
||||||
const prNumber = getPrNumber();
|
const prNumber = getPrNumber();
|
||||||
if (!prNumber) {
|
if (!prNumber) {
|
||||||
@@ -23,7 +28,7 @@ export async function run() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const client: ClientType = github.getOctokit(token);
|
const client: ClientType = github.getOctokit(token, {}, pluginRetry.retry);
|
||||||
|
|
||||||
const {data: pullRequest} = await client.rest.pulls.get({
|
const {data: pullRequest} = await client.rest.pulls.get({
|
||||||
owner: github.context.repo.owner,
|
owner: github.context.repo.owner,
|
||||||
@@ -38,23 +43,55 @@ export async function run() {
|
|||||||
configPath
|
configPath
|
||||||
);
|
);
|
||||||
|
|
||||||
const labels: string[] = [];
|
const preexistingLabels = pullRequest.labels.map(l => l.name);
|
||||||
const labelsToRemove: string[] = [];
|
const allLabels: Set<string> = new Set<string>(preexistingLabels);
|
||||||
|
|
||||||
for (const [label, globs] of labelGlobs.entries()) {
|
for (const [label, globs] of labelGlobs.entries()) {
|
||||||
core.debug(`processing ${label}`);
|
core.debug(`processing ${label}`);
|
||||||
if (checkGlobs(changedFiles, globs)) {
|
if (checkGlobs(changedFiles, globs, dot)) {
|
||||||
labels.push(label);
|
allLabels.add(label);
|
||||||
} else if (pullRequest.labels.find(l => l.name === label)) {
|
} else if (syncLabels) {
|
||||||
labelsToRemove.push(label);
|
allLabels.delete(label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.length > 0) {
|
const labelsToAdd = [...allLabels].slice(0, GITHUB_MAX_LABELS);
|
||||||
await addLabels(client, prNumber, labels);
|
const excessLabels = [...allLabels].slice(GITHUB_MAX_LABELS);
|
||||||
}
|
|
||||||
|
|
||||||
if (syncLabels && labelsToRemove.length) {
|
try {
|
||||||
await removeLabels(client, prNumber, labelsToRemove);
|
let newLabels: string[] = [];
|
||||||
|
|
||||||
|
if (!isListEqual(labelsToAdd, preexistingLabels)) {
|
||||||
|
await setLabels(client, prNumber, labelsToAdd);
|
||||||
|
newLabels = labelsToAdd.filter(l => !preexistingLabels.includes(l));
|
||||||
|
}
|
||||||
|
|
||||||
|
core.setOutput('new-labels', newLabels.join(','));
|
||||||
|
core.setOutput('all-labels', labelsToAdd.join(','));
|
||||||
|
|
||||||
|
if (excessLabels.length) {
|
||||||
|
core.warning(
|
||||||
|
`Maximum of ${GITHUB_MAX_LABELS} labels allowed. Excess labels: ${excessLabels.join(
|
||||||
|
', '
|
||||||
|
)}`,
|
||||||
|
{title: 'Label limit for a PR exceeded'}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (error: any) {
|
||||||
|
if (
|
||||||
|
error.name === 'HttpError' &&
|
||||||
|
error.message === 'Resource not accessible by integration'
|
||||||
|
) {
|
||||||
|
core.warning(
|
||||||
|
`The action requires write permission to add labels to pull requests. For more information please refer to the action documentation: https://github.com/actions/labeler#permissions`,
|
||||||
|
{
|
||||||
|
title: `${process.env['GITHUB_ACTION_REPOSITORY']} running under '${github.context.eventName}' is misconfigured`
|
||||||
|
}
|
||||||
|
);
|
||||||
|
core.setFailed(error.message);
|
||||||
|
} else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
core.error(error);
|
core.error(error);
|
||||||
@@ -157,12 +194,13 @@ function printPattern(matcher: Minimatch): string {
|
|||||||
|
|
||||||
export function checkGlobs(
|
export function checkGlobs(
|
||||||
changedFiles: string[],
|
changedFiles: string[],
|
||||||
globs: StringOrMatchConfig[]
|
globs: StringOrMatchConfig[],
|
||||||
|
dot: boolean
|
||||||
): boolean {
|
): boolean {
|
||||||
for (const glob of globs) {
|
for (const glob of globs) {
|
||||||
core.debug(` checking pattern ${JSON.stringify(glob)}`);
|
core.debug(` checking pattern ${JSON.stringify(glob)}`);
|
||||||
const matchConfig = toMatchConfig(glob);
|
const matchConfig = toMatchConfig(glob);
|
||||||
if (checkMatch(changedFiles, matchConfig)) {
|
if (checkMatch(changedFiles, matchConfig, dot)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,8 +222,12 @@ function isMatch(changedFile: string, matchers: Minimatch[]): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// equivalent to "Array.some()" but expanded for debugging and clarity
|
// equivalent to "Array.some()" but expanded for debugging and clarity
|
||||||
function checkAny(changedFiles: string[], globs: string[]): boolean {
|
function checkAny(
|
||||||
const matchers = globs.map(g => new Minimatch(g));
|
changedFiles: string[],
|
||||||
|
globs: string[],
|
||||||
|
dot: boolean
|
||||||
|
): boolean {
|
||||||
|
const matchers = globs.map(g => new Minimatch(g, {dot}));
|
||||||
core.debug(` checking "any" patterns`);
|
core.debug(` checking "any" patterns`);
|
||||||
for (const changedFile of changedFiles) {
|
for (const changedFile of changedFiles) {
|
||||||
if (isMatch(changedFile, matchers)) {
|
if (isMatch(changedFile, matchers)) {
|
||||||
@@ -199,8 +241,12 @@ function checkAny(changedFiles: string[], globs: string[]): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// equivalent to "Array.every()" but expanded for debugging and clarity
|
// equivalent to "Array.every()" but expanded for debugging and clarity
|
||||||
function checkAll(changedFiles: string[], globs: string[]): boolean {
|
function checkAll(
|
||||||
const matchers = globs.map(g => new Minimatch(g));
|
changedFiles: string[],
|
||||||
|
globs: string[],
|
||||||
|
dot: boolean
|
||||||
|
): boolean {
|
||||||
|
const matchers = globs.map(g => new Minimatch(g, {dot}));
|
||||||
core.debug(` checking "all" patterns`);
|
core.debug(` checking "all" patterns`);
|
||||||
for (const changedFile of changedFiles) {
|
for (const changedFile of changedFiles) {
|
||||||
if (!isMatch(changedFile, matchers)) {
|
if (!isMatch(changedFile, matchers)) {
|
||||||
@@ -213,15 +259,19 @@ function checkAll(changedFiles: string[], globs: string[]): boolean {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkMatch(changedFiles: string[], matchConfig: MatchConfig): boolean {
|
function checkMatch(
|
||||||
|
changedFiles: string[],
|
||||||
|
matchConfig: MatchConfig,
|
||||||
|
dot: boolean
|
||||||
|
): boolean {
|
||||||
if (matchConfig.all !== undefined) {
|
if (matchConfig.all !== undefined) {
|
||||||
if (!checkAll(changedFiles, matchConfig.all)) {
|
if (!checkAll(changedFiles, matchConfig.all, dot)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchConfig.any !== undefined) {
|
if (matchConfig.any !== undefined) {
|
||||||
if (!checkAny(changedFiles, matchConfig.any)) {
|
if (!checkAny(changedFiles, matchConfig.any, dot)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -229,32 +279,19 @@ function checkMatch(changedFiles: string[], matchConfig: MatchConfig): boolean {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addLabels(
|
function isListEqual(listA: string[], listB: string[]): boolean {
|
||||||
|
return listA.length === listB.length && listA.every(el => listB.includes(el));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function setLabels(
|
||||||
client: ClientType,
|
client: ClientType,
|
||||||
prNumber: number,
|
prNumber: number,
|
||||||
labels: string[]
|
labels: string[]
|
||||||
) {
|
) {
|
||||||
await client.rest.issues.addLabels({
|
await client.rest.issues.setLabels({
|
||||||
owner: github.context.repo.owner,
|
owner: github.context.repo.owner,
|
||||||
repo: github.context.repo.repo,
|
repo: github.context.repo.repo,
|
||||||
issue_number: prNumber,
|
issue_number: prNumber,
|
||||||
labels: labels
|
labels: labels
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeLabels(
|
|
||||||
client: ClientType,
|
|
||||||
prNumber: number,
|
|
||||||
labels: string[]
|
|
||||||
) {
|
|
||||||
await Promise.all(
|
|
||||||
labels.map(label =>
|
|
||||||
client.rest.issues.removeLabel({
|
|
||||||
owner: github.context.repo.owner,
|
|
||||||
repo: github.context.repo.repo,
|
|
||||||
issue_number: prNumber,
|
|
||||||
name: label
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user