mirror of
https://github.com/actions/labeler
synced 2026-09-04 19:15:10 +02:00
Compare commits
239
Commits
releases/v4
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98ce1450c7 | ||
|
|
2c2a2313b2 | ||
|
|
b7a8804475 | ||
|
|
bf12e9b00b | ||
|
|
b8dd2d9be0 | ||
|
|
53affe8ca4 | ||
|
|
f612d9ad18 | ||
|
|
f27b608878 | ||
|
|
c5dadc2a45 | ||
|
|
e52e4fb63e | ||
|
|
77a4082b84 | ||
|
|
25abb3cad4 | ||
|
|
395c8cfdb1 | ||
|
|
634933edcd | ||
|
|
f1a63e87db | ||
|
|
b0a1180683 | ||
|
|
110d44140c | ||
|
|
bee50fefe1 | ||
|
|
6463cdb00e | ||
|
|
c209686724 | ||
|
|
5184940b54 | ||
|
|
3629d5568b | ||
|
|
d24f7f3731 | ||
|
|
425a1f1422 | ||
|
|
2755f92612 | ||
|
|
31efb45c79 | ||
|
|
deb1c03ec1 | ||
|
|
a261db4c87 | ||
|
|
5838aad63e | ||
|
|
98d12e7f87 | ||
|
|
857d8ca96a | ||
|
|
bb8f002e4f | ||
|
|
70db055cd5 | ||
|
|
2e99c4dc10 | ||
|
|
506e1a00c6 | ||
|
|
83720bce86 | ||
|
|
e5bd067930 | ||
|
|
b2b2c20d44 | ||
|
|
02180c4758 | ||
|
|
17086b7743 | ||
|
|
5e969e09f0 | ||
|
|
035de5e30d | ||
|
|
73e8e27589 | ||
|
|
ccee68d6cf | ||
|
|
2b7003274c | ||
|
|
90cc4c2623 | ||
|
|
4a56a41318 | ||
|
|
aa18a3cacc | ||
|
|
dea3f9b186 | ||
|
|
0ad0ff974e | ||
|
|
4b5201e562 | ||
|
|
ccaeba86e2 | ||
|
|
08bb101f04 | ||
|
|
f9ea084de7 | ||
|
|
587debe10c | ||
|
|
8558fd7429 | ||
|
|
000ca75fe6 | ||
|
|
cb66c2f078 | ||
|
|
9181355e36 | ||
|
|
efe4c1c90e | ||
|
|
c0957ad7c3 | ||
|
|
8dc8d1842f | ||
|
|
d0d0bbebfb | ||
|
|
1375c42512 | ||
|
|
ab7411ec21 | ||
|
|
917e5cce72 | ||
|
|
212b4a75b7 | ||
|
|
f3aca66a22 | ||
|
|
3985e4151a | ||
|
|
0b00d259ba | ||
|
|
dd1ca3d590 | ||
|
|
df65a7144a | ||
|
|
8207c1460c | ||
|
|
27ee87f076 | ||
|
|
2b2e7d04cb | ||
|
|
f4eefdc659 | ||
|
|
519694ef2f | ||
|
|
c53368623a | ||
|
|
6c834e41a8 | ||
|
|
725d4ca893 | ||
|
|
ccd4640a2c | ||
|
|
92c8874170 | ||
|
|
c3a152eec1 | ||
|
|
a76cf44ddb | ||
|
|
14fcf05d5e | ||
|
|
59718b0b66 | ||
|
|
cc1a954400 | ||
|
|
d09ea578e9 | ||
|
|
5ede40d9ff | ||
|
|
bb8a4df924 | ||
|
|
78e4f87e68 | ||
|
|
5ae53a98f4 | ||
|
|
3ee17b5bb8 | ||
|
|
0c69b1fb2d | ||
|
|
46b10999d9 | ||
|
|
e4e046fbf8 | ||
|
|
3a11e77e22 | ||
|
|
0807891f38 | ||
|
|
41bb6cf646 | ||
|
|
01042f3ad7 | ||
|
|
e3f446034f | ||
|
|
c40a0983dc | ||
|
|
bebba55950 | ||
|
|
3b7f505149 | ||
|
|
5bb656d641 | ||
|
|
c3a5749d46 | ||
|
|
b2180b4a4b | ||
|
|
4f68989491 | ||
|
|
b657d45124 | ||
|
|
fbba7c5cc1 | ||
|
|
68124ad53a | ||
|
|
3cc2196fe8 | ||
|
|
6d6995cc8a | ||
|
|
ab39889de0 | ||
|
|
6fe6672296 | ||
|
|
e482ff4263 | ||
|
|
b3ae1bded7 | ||
|
|
4f052778de | ||
|
|
26342ba349 | ||
|
|
e1fcf6fe5b | ||
|
|
3352df1f2b | ||
|
|
57d34076e0 | ||
|
|
a256a58edf | ||
|
|
a5bed11d4d | ||
|
|
4ac17648a4 | ||
|
|
34a5bf6e83 | ||
|
|
09645fd40d | ||
|
|
51cc5e079c | ||
|
|
9cfddd0144 | ||
|
|
3aa0d436e5 | ||
|
|
9488def29a | ||
|
|
11812c37f6 | ||
|
|
68a2598016 | ||
|
|
13e75b4361 | ||
|
|
2a3422a64e | ||
|
|
c1b0ca76ee | ||
|
|
2637d23bca | ||
|
|
d4d4a104a2 | ||
|
|
7f169bc0f2 | ||
|
|
2f1dfd1ef0 | ||
|
|
b1a2f85ed8 | ||
|
|
67604ee822 | ||
|
|
4be192c7d6 | ||
|
|
3ddce51a65 | ||
|
|
938f9c9893 | ||
|
|
210043eed1 | ||
|
|
fa7f98c785 | ||
|
|
29382eb4ff | ||
|
|
0b2cfb01d7 | ||
|
|
62f22bdebe | ||
|
|
ef6ab1b64a | ||
|
|
5ac9519cbf | ||
|
|
4554c0d1af | ||
|
|
49676461cb | ||
|
|
432b275f71 | ||
|
|
3bec9227d1 | ||
|
|
a9e07ce8ff | ||
|
|
e51b118725 | ||
|
|
5d0a66ed59 | ||
|
|
9bfc9998ab | ||
|
|
8e6367ddee | ||
|
|
1c9c27e128 | ||
|
|
b25e3a8c27 | ||
|
|
d31255f7be | ||
|
|
92990c0c57 | ||
|
|
d0d3628020 | ||
|
|
cc1e02580b | ||
|
|
64ce5e9235 | ||
|
|
7741e57c6a | ||
|
|
65b7640e45 | ||
|
|
e9a1777eb0 | ||
|
|
17694aa238 | ||
|
|
c31ee1fd86 | ||
|
|
3af9a47a26 | ||
|
|
a988f4eb9d | ||
|
|
ef108a9d83 | ||
|
|
1ce9b356f6 | ||
|
|
9f259ee115 | ||
|
|
c08f5faa12 | ||
|
|
51b763cbf2 | ||
|
|
e939550344 | ||
|
|
e4486e9ed9 | ||
|
|
fc5eb711b0 | ||
|
|
3eec5d8ccc | ||
|
|
90ef37079a | ||
|
|
f40b38734d | ||
|
|
84e83a9b19 | ||
|
|
5e6bdf6d89 | ||
|
|
394a01bde3 | ||
|
|
2a5bc55cbf | ||
|
|
2e10ffb6ec | ||
|
|
e5b1bddf5e | ||
|
|
8943ca20c9 | ||
|
|
56347d54a1 | ||
|
|
da83a1845f | ||
|
|
ed31b27f2e | ||
|
|
09f085373a | ||
|
|
0eb9d49330 | ||
|
|
b071d82cb8 | ||
|
|
7d175313b7 | ||
|
|
969899da68 | ||
|
|
7a5c525049 | ||
|
|
922ffdf5ad | ||
|
|
231de6bc24 | ||
|
|
2daf35ae4b | ||
|
|
0b6e68d75a | ||
|
|
cd3a8df80d | ||
|
|
2343710777 | ||
|
|
f2b2513f41 | ||
|
|
8c59eccb9d | ||
|
|
7b1327b4c4 | ||
|
|
c54c5a2057 | ||
|
|
7f8d8e472d | ||
|
|
4c74e84461 | ||
|
|
0861fa5acc | ||
|
|
0ad789cf22 | ||
|
|
6e276063fe | ||
|
|
818399d10f | ||
|
|
71fc664414 | ||
|
|
7aadc17f94 | ||
|
|
89f6b77325 | ||
|
|
2246b667c6 | ||
|
|
ab49f7a2bd | ||
|
|
2d63815c83 | ||
|
|
76242143df | ||
|
|
27a1d89941 | ||
|
|
79c0cc7c0b | ||
|
|
d9ed3e87f6 | ||
|
|
2ced1f3255 | ||
|
|
cb5f4480b2 | ||
|
|
8aa7614bc1 | ||
|
|
827e1186a2 | ||
|
|
765934f274 | ||
|
|
bce88a9ea3 | ||
|
|
a01b9aebb2 | ||
|
|
ee0e0eb513 | ||
|
|
6c50d09410 | ||
|
|
ad73546cad | ||
|
|
2bf42e445d |
@@ -1,7 +0,0 @@
|
||||
# Ignore list
|
||||
/*
|
||||
|
||||
# Do not ignore these folders:
|
||||
!__tests__/
|
||||
!__mocks__/
|
||||
!src/
|
||||
@@ -1,51 +0,0 @@
|
||||
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
||||
module.exports = {
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:eslint-plugin-jest/recommended',
|
||||
'eslint-config-prettier'
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-require-imports': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': [
|
||||
'error',
|
||||
{
|
||||
'ts-ignore': 'allow-with-description'
|
||||
}
|
||||
],
|
||||
'no-console': 'error',
|
||||
'yoda': 'error',
|
||||
'prefer-const': [
|
||||
'error',
|
||||
{
|
||||
destructuring: 'all'
|
||||
}
|
||||
],
|
||||
'no-control-regex': 'off',
|
||||
'no-constant-condition': ['error', {checkLoops: false}],
|
||||
'node/no-extraneous-import': 'error'
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*{test,spec}.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'jest/no-standalone-expect': 'off',
|
||||
'jest/no-conditional-expect': 'off',
|
||||
'no-console': 'off',
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
env: {
|
||||
node: true,
|
||||
es6: true,
|
||||
'jest/globals': true
|
||||
}
|
||||
};
|
||||
@@ -15,3 +15,5 @@ jobs:
|
||||
call-basic-validation:
|
||||
name: Basic validation
|
||||
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||
with:
|
||||
node-version: '24.x'
|
||||
|
||||
@@ -15,3 +15,5 @@ jobs:
|
||||
call-check-dist:
|
||||
name: Check dist/
|
||||
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||
with:
|
||||
node-version: '24.x'
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
name: 'Publish Immutable Action Version'
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checking out
|
||||
uses: actions/checkout@v5
|
||||
- name: Publish
|
||||
id: publish
|
||||
uses: actions/publish-immutable-action@0.0.3
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update the ${{ env.TAG_NAME }} tag
|
||||
uses: actions/publish-action@v0.2.2
|
||||
uses: actions/publish-action@v0.4.0
|
||||
with:
|
||||
source-tag: ${{ env.TAG_NAME }}
|
||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
+5
-1
@@ -11,4 +11,8 @@ allowed:
|
||||
- unlicense
|
||||
|
||||
reviewed:
|
||||
npm:
|
||||
npm:
|
||||
- "@actions/http-client"
|
||||
- balanced-match
|
||||
- brace-expansion
|
||||
- minimatch
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/core"
|
||||
version: 1.10.0
|
||||
version: 3.0.1
|
||||
type: npm
|
||||
summary: Actions core lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
---
|
||||
name: color-name
|
||||
version: 1.1.4
|
||||
name: "@actions/exec"
|
||||
version: 3.0.0
|
||||
type: npm
|
||||
summary: A list of color names and its values
|
||||
homepage: https://github.com/colorjs/color-name
|
||||
summary: Actions exec lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
- sources: LICENSE.md
|
||||
text: |-
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2015 Dmitry Ivanov
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
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:
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/github"
|
||||
version: 5.1.1
|
||||
version: 9.1.1
|
||||
type: npm
|
||||
summary: Actions github lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/github
|
||||
|
||||
Generated
+2
-2
@@ -1,10 +1,10 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 2.0.1
|
||||
version: 3.0.2
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
license: mit
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 4.0.1
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
name: uuid
|
||||
version: 8.3.2
|
||||
name: "@actions/io"
|
||||
version: 3.0.2
|
||||
type: npm
|
||||
summary: RFC4122 (v1, v4, and v5) UUIDs
|
||||
homepage:
|
||||
summary: Actions io lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
text: |-
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
||||
Copyright 2019 GitHub
|
||||
|
||||
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:
|
||||
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@jest/schemas"
|
||||
version: 29.6.0
|
||||
type: npm
|
||||
summary:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
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: []
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/auth-token"
|
||||
version: 2.5.0
|
||||
version: 6.0.0
|
||||
type: npm
|
||||
summary: GitHub API token authentication for browsers and Node.js
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/core"
|
||||
version: 3.6.0
|
||||
version: 7.0.6
|
||||
type: npm
|
||||
summary: Extendable client for GitHub's REST & GraphQL APIs
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/endpoint"
|
||||
version: 6.0.12
|
||||
version: 11.0.3
|
||||
type: npm
|
||||
summary: Turns REST API endpoints into generic request options
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/graphql"
|
||||
version: 4.8.0
|
||||
version: 9.0.3
|
||||
type: npm
|
||||
summary: GitHub GraphQL API client for browsers and Node
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
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: []
|
||||
Generated
+3
-3
@@ -1,14 +1,14 @@
|
||||
---
|
||||
name: "@octokit/openapi-types"
|
||||
version: 12.11.0
|
||||
version: 27.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
|
||||
text: |
|
||||
Copyright (c) GitHub 2025 - Licensed as MIT.
|
||||
|
||||
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:
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/plugin-paginate-rest"
|
||||
version: 2.21.3
|
||||
version: 14.0.0
|
||||
type: npm
|
||||
summary: Octokit plugin to paginate REST API endpoint responses
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/plugin-rest-endpoint-methods"
|
||||
version: 5.16.2
|
||||
version: 17.0.0
|
||||
type: npm
|
||||
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/plugin-retry"
|
||||
version: 5.0.5
|
||||
version: 8.1.0
|
||||
type: npm
|
||||
summary: Automatic retry plugin for octokit
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: "@octokit/request-error"
|
||||
version: 2.1.0
|
||||
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: []
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: "@octokit/request-error"
|
||||
version: 4.0.2
|
||||
version: 7.1.0
|
||||
type: npm
|
||||
summary: Error class for Octokit request errors
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
Generated
+2
-2
@@ -1,10 +1,10 @@
|
||||
---
|
||||
name: "@octokit/request"
|
||||
version: 5.6.3
|
||||
version: 10.0.10
|
||||
type: npm
|
||||
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
|
||||
and Node
|
||||
homepage:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
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: []
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@octokit/types"
|
||||
version: 6.41.0
|
||||
version: 16.0.0
|
||||
type: npm
|
||||
summary: Shared TypeScript definitions for Octokit projects
|
||||
homepage:
|
||||
Generated
-26
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: "@sinclair/typebox"
|
||||
version: 0.27.8
|
||||
type: npm
|
||||
summary: JSONSchema Type Builder with Static Type Resolution for TypeScript
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: "TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript
|
||||
\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2023 Haydn Paterson (sinclair)
|
||||
<haydn.developer@gmail.com>\n\nPermission is hereby granted, free of charge, to
|
||||
any person obtaining a copy\nof this software and associated documentation files
|
||||
(the \"Software\"), to deal\nin the Software without restriction, including without
|
||||
limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell\ncopies of the Software, and to permit persons to whom the Software
|
||||
is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright
|
||||
notice and this permission notice shall be included in\nall copies or substantial
|
||||
portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY
|
||||
OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
|
||||
OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN\nTHE SOFTWARE."
|
||||
notices: []
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/istanbul-lib-coverage"
|
||||
version: 2.0.4
|
||||
type: npm
|
||||
summary: TypeScript definitions for istanbul-lib-coverage
|
||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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: []
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/istanbul-lib-report"
|
||||
version: 3.0.0
|
||||
type: npm
|
||||
summary: TypeScript definitions for istanbul-lib-report
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
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: []
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/istanbul-reports"
|
||||
version: 3.0.1
|
||||
type: npm
|
||||
summary: TypeScript definitions for istanbul-reports
|
||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/node"
|
||||
version: 16.18.11
|
||||
type: npm
|
||||
summary: TypeScript definitions for Node.js
|
||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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: []
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/yargs-parser"
|
||||
version: 21.0.0
|
||||
type: npm
|
||||
summary: TypeScript definitions for yargs-parser
|
||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@types/yargs"
|
||||
version: 17.0.24
|
||||
type: npm
|
||||
summary: TypeScript definitions for yargs
|
||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |2
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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: []
|
||||
Generated
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: ansi-styles
|
||||
version: 4.3.0
|
||||
type: npm
|
||||
summary: ANSI escape codes for styling strings in the terminal
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
Generated
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: ansi-styles
|
||||
version: 5.2.0
|
||||
type: npm
|
||||
summary: ANSI escape codes for styling strings in the terminal
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
Generated
+5
-26
@@ -1,39 +1,18 @@
|
||||
---
|
||||
name: balanced-match
|
||||
version: 1.0.2
|
||||
version: 4.0.4
|
||||
type: npm
|
||||
summary: Match balanced character pairs, like "{" and "}"
|
||||
homepage: https://github.com/juliangruber/balanced-match
|
||||
license: mit
|
||||
homepage:
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
Original code Copyright Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
- sources: README.md
|
||||
text: |-
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: before-after-hook
|
||||
version: 2.2.3
|
||||
version: 4.0.0
|
||||
type: npm
|
||||
summary: asynchronous before/error/after hooks for internal functionality
|
||||
homepage:
|
||||
homepage:
|
||||
license: apache-2.0
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
Generated
+6
-27
@@ -1,16 +1,18 @@
|
||||
---
|
||||
name: brace-expansion
|
||||
version: 2.0.1
|
||||
version: 5.0.9
|
||||
type: npm
|
||||
summary: Brace expansion as known from sh/bash
|
||||
homepage: https://github.com/juliangruber/brace-expansion
|
||||
license: mit
|
||||
homepage:
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
Copyright Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -22,29 +24,6 @@ licenses:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
- sources: README.md
|
||||
text: |-
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal 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
|
||||
|
||||
Generated
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: chalk
|
||||
version: 4.1.2
|
||||
type: npm
|
||||
summary: Terminal string styling done right
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
Generated
-34
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: ci-info
|
||||
version: 3.7.1
|
||||
type: npm
|
||||
summary: Get details about the current Continuous Integration environment
|
||||
homepage: https://github.com/watson/ci-info
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2023 Thomas Watson Steen
|
||||
|
||||
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: []
|
||||
Generated
-35
@@ -1,35 +0,0 @@
|
||||
---
|
||||
name: color-convert
|
||||
version: 2.0.1
|
||||
type: npm
|
||||
summary: Plain color conversion functions
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |+
|
||||
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
- sources: README.md
|
||||
text: Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under
|
||||
the [MIT License](LICENSE).
|
||||
notices: []
|
||||
Generated
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
name: content-type
|
||||
version: 2.0.0
|
||||
type: npm
|
||||
summary: Create and parse HTTP Content-Type header
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Douglas Christopher Wilson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
- sources: README.md
|
||||
text: |-
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/content-type
|
||||
[npm-url]: https://npmjs.org/package/content-type
|
||||
[downloads-image]: https://img.shields.io/npm/dm/content-type
|
||||
[downloads-url]: https://npmjs.org/package/content-type
|
||||
[build-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-type/ci.yml?branch=master
|
||||
[build-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml?query=branch%3Amaster
|
||||
[coverage-image]: https://img.shields.io/codecov/c/gh/jshttp/content-type
|
||||
[coverage-url]: https://codecov.io/gh/jshttp/content-type
|
||||
[license-image]: http://img.shields.io/npm/l/content-type.svg?style=flat
|
||||
[license-url]: LICENSE
|
||||
notices: []
|
||||
Generated
-28
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: deprecation
|
||||
version: 2.3.1
|
||||
type: npm
|
||||
summary: Log a deprecation message with stack
|
||||
homepage:
|
||||
license: isc
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Gregor Martynus and contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
- sources: README.md
|
||||
text: "[ISC](LICENSE)"
|
||||
notices: []
|
||||
Generated
-26
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: graceful-fs
|
||||
version: 4.2.10
|
||||
type: npm
|
||||
summary: A drop-in replacement for fs, making various improvements.
|
||||
homepage:
|
||||
license: isc
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The ISC License
|
||||
|
||||
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
notices: []
|
||||
Generated
-22
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: has-flag
|
||||
version: 4.0.0
|
||||
type: npm
|
||||
summary: Check if argv has a specific flag
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
- sources: readme.md
|
||||
text: MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
notices: []
|
||||
Generated
-40
@@ -1,40 +0,0 @@
|
||||
---
|
||||
name: is-plain-object
|
||||
version: 5.0.0
|
||||
type: npm
|
||||
summary: Returns true if an object was created by the `Object` constructor, or Object.create(null).
|
||||
homepage: https://github.com/jonschlinkert/is-plain-object
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
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: |-
|
||||
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._
|
||||
notices: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: jest-get-type
|
||||
version: 29.4.3
|
||||
type: npm
|
||||
summary: A utility function to get the type of a value
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
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: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: jest-util
|
||||
version: 29.6.1
|
||||
type: npm
|
||||
summary:
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
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: []
|
||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: js-yaml
|
||||
version: 4.1.0
|
||||
version: 5.2.3
|
||||
type: npm
|
||||
summary: YAML 1.2 parser and serializer
|
||||
homepage: https://github.com/nodeca/js-yaml
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
|
||||
+6
-5
@@ -1,16 +1,17 @@
|
||||
---
|
||||
name: "@jest/types"
|
||||
version: 29.6.1
|
||||
name: json-with-bigint
|
||||
version: 3.5.8
|
||||
type: npm
|
||||
summary:
|
||||
homepage:
|
||||
summary: JS library that allows you to easily serialize and deserialize data with
|
||||
BigInt values
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
Copyright (c) 2023 Ivan Korolenko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
Generated
+56
-16
@@ -1,26 +1,66 @@
|
||||
---
|
||||
name: minimatch
|
||||
version: 7.4.3
|
||||
version: 10.2.5
|
||||
type: npm
|
||||
summary: a glob matcher in javascript
|
||||
homepage:
|
||||
license: isc
|
||||
homepage:
|
||||
license: blueoak-1.0.0
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
The ISC License
|
||||
# Blue Oak Model License
|
||||
|
||||
Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors
|
||||
Version 1.0.0
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
## Purpose
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
This license gives everyone as much permission to work with
|
||||
this software as possible, while protecting contributors
|
||||
from liability.
|
||||
|
||||
## Acceptance
|
||||
|
||||
In order to receive this license, you must agree to its
|
||||
rules. The rules of this license are both obligations
|
||||
under that agreement and conditions to your license.
|
||||
You must not do anything with this software that triggers
|
||||
a rule that you cannot or will not follow.
|
||||
|
||||
## Copyright
|
||||
|
||||
Each contributor licenses you to do everything with this
|
||||
software that would otherwise infringe that contributor's
|
||||
copyright in it.
|
||||
|
||||
## Notices
|
||||
|
||||
You must ensure that everyone who gets a copy of
|
||||
any part of this software from you, with or without
|
||||
changes, also gets the text of this license or a link to
|
||||
<https://blueoakcouncil.org/license/1.0.0>.
|
||||
|
||||
## Excuse
|
||||
|
||||
If anyone notifies you in writing that you have not
|
||||
complied with [Notices](#notices), you can keep your
|
||||
license by taking all practical steps to comply within 30
|
||||
days after the notice. If you do not do so, your license
|
||||
ends immediately.
|
||||
|
||||
## Patent
|
||||
|
||||
Each contributor licenses you to do everything with this
|
||||
software that would otherwise infringe any patent claims
|
||||
they can license or become able to license.
|
||||
|
||||
## Reliability
|
||||
|
||||
No contributor can revoke this license.
|
||||
|
||||
## No Liability
|
||||
|
||||
**_As far as the law allows, this software comes as is,
|
||||
without any warranty or condition, and no contributor
|
||||
will be liable to anyone for any damages related to this
|
||||
software or this license, under any kind of legal claim._**
|
||||
notices: []
|
||||
|
||||
Generated
-56
@@ -1,56 +0,0 @@
|
||||
---
|
||||
name: node-fetch
|
||||
version: 2.6.7
|
||||
type: npm
|
||||
summary: A light-weight module that brings window.fetch to node.js
|
||||
homepage: https://github.com/bitinn/node-fetch
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |+
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 David Frank
|
||||
|
||||
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
|
||||
|
||||
[npm-image]: https://flat.badgen.net/npm/v/node-fetch
|
||||
[npm-url]: https://www.npmjs.com/package/node-fetch
|
||||
[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch
|
||||
[travis-url]: https://travis-ci.org/bitinn/node-fetch
|
||||
[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master
|
||||
[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
|
||||
[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
|
||||
[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch
|
||||
[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square
|
||||
[discord-url]: https://discord.gg/Zxbndcm
|
||||
[opencollective-image]: https://opencollective.com/node-fetch/backers.svg
|
||||
[opencollective-url]: https://opencollective.com/node-fetch
|
||||
[whatwg-fetch]: https://fetch.spec.whatwg.org/
|
||||
[response-init]: https://fetch.spec.whatwg.org/#responseinit
|
||||
[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
|
||||
[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
|
||||
[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md
|
||||
[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
|
||||
[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md
|
||||
notices: []
|
||||
Generated
-26
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: once
|
||||
version: 1.4.0
|
||||
type: npm
|
||||
summary: Run a function exactly one time
|
||||
homepage:
|
||||
license: isc
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
notices: []
|
||||
Generated
-38
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: picomatch
|
||||
version: 2.3.1
|
||||
type: npm
|
||||
summary: Blazing fast and accurate glob matcher written in JavaScript, with no dependencies
|
||||
and full support for standard and extended Bash glob features, including braces,
|
||||
extglobs, POSIX brackets, and regular expressions.
|
||||
homepage: https://github.com/micromatch/picomatch
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017-present, Jon Schlinkert.
|
||||
|
||||
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: |-
|
||||
Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
notices: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: pretty-format
|
||||
version: 29.6.1
|
||||
type: npm
|
||||
summary: Stringify any JavaScript value.
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
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: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: react-is
|
||||
version: 18.2.0
|
||||
type: npm
|
||||
summary: Brand checking of React Elements.
|
||||
homepage: https://reactjs.org/
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
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: []
|
||||
Generated
-20
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: supports-color
|
||||
version: 7.2.0
|
||||
type: npm
|
||||
summary: Detect whether a terminal supports color
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: license
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
Generated
-30
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: tr46
|
||||
version: 0.0.3
|
||||
type: npm
|
||||
summary: An implementation of the Unicode TR46 spec
|
||||
homepage: https://github.com/Sebmaster/tr46.js#readme
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: Auto-generated MIT license text
|
||||
text: |
|
||||
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: []
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
name: jest-each
|
||||
version: 29.6.1
|
||||
name: undici
|
||||
version: 6.28.0
|
||||
type: npm
|
||||
summary: Parameterised tests for Jest
|
||||
homepage:
|
||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||
homepage: https://undici.nodejs.org
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
Copyright (c) Matteo Collina and Undici 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
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
---
|
||||
name: universal-user-agent
|
||||
version: 6.0.0
|
||||
version: 7.0.3
|
||||
type: npm
|
||||
summary: Get a user agent string in both browser and node
|
||||
homepage:
|
||||
summary: Get a user agent string across all JavaScript Runtime Environments
|
||||
homepage:
|
||||
license: isc
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
# [ISC License](https://spdx.org/licenses/ISC)
|
||||
|
||||
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
|
||||
Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
|
||||
Generated
-23
@@ -1,23 +0,0 @@
|
||||
---
|
||||
name: webidl-conversions
|
||||
version: 3.0.1
|
||||
type: npm
|
||||
summary: Implements the WebIDL algorithms for converting to and from JavaScript values
|
||||
homepage:
|
||||
license: bsd-2-clause
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
# The BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2014, Domenic Denicola
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
notices: []
|
||||
Generated
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: whatwg-url
|
||||
version: 5.0.0
|
||||
type: npm
|
||||
summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.txt
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
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: []
|
||||
Generated
-26
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: wrappy
|
||||
version: 1.0.2
|
||||
type: npm
|
||||
summary: Callback wrapping utility
|
||||
homepage: https://github.com/npm/wrappy
|
||||
license: isc
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
notices: []
|
||||
@@ -1,11 +0,0 @@
|
||||
// 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'
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": false,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
@@ -2,104 +2,254 @@
|
||||
|
||||
[](https://github.com/actions/labeler/actions/workflows/basic-validation.yml)
|
||||
|
||||
Automatically label new pull requests based on the paths of files being changed.
|
||||
Automatically label new pull requests based on the paths of files being changed or the branch name.
|
||||
|
||||
## What's changed in V7
|
||||
|
||||
- **Migrated to ESM** internally to support the latest `@actions/*` package versions. No changes to action inputs, outputs, or behavior.
|
||||
|
||||
## Breaking changes in V6
|
||||
|
||||
- Upgraded action from node20 to node24.
|
||||
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||
|
||||
For more details, see the full release notes on the [release page](https://github.com/actions/labeler/releases/tag/v6.0.0)
|
||||
|
||||
## Breaking changes in V5
|
||||
1) The ability to apply labels based on the names of base and/or head branches was added ([#186](https://github.com/actions/labeler/issues/186) and [#54](https://github.com/actions/labeler/issues/54)). The match object for changed files was expanded with new combinations in order to make it more intuitive and flexible ([#423](https://github.com/actions/labeler/issues/423) and [#101](https://github.com/actions/labeler/issues/101)). As a result, the configuration file structure was significantly redesigned and is not compatible with the structure of the previous version. Please read the documentation below to find out how to adapt your configuration files for use with the new action version.
|
||||
|
||||
2) The bug related to the `sync-labels` input was fixed ([#112](https://github.com/actions/labeler/issues/112)). Now the input value is read correctly.
|
||||
|
||||
3) By default, `dot` input is set to `true`. Now, paths starting with a dot (e.g. `.github`) are matched by default.
|
||||
|
||||
4) Version 5 of this action updated the [runtime to Node.js 20](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions). All scripts are now run with Node.js 20 instead of Node.js 16 and are affected by any breaking changes between Node.js 16 and 20.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Before the update to the v5, please check out [this information](#notes-regarding-pull_request_target-event) about the `pull_request_target` event trigger.
|
||||
|
||||
## Usage
|
||||
|
||||
### Create `.github/labeler.yml`
|
||||
|
||||
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 config options to match and apply the label.
|
||||
|
||||
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.
|
||||
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 a match object.
|
||||
|
||||
#### Match Object
|
||||
|
||||
For more control over matching, you can provide a match object instead of a simple path glob. The match object is defined as:
|
||||
The match object allows control over the matching options. You can specify the label to be applied based on the files that have changed or the name of either the base branch or the head branch. For the changed files options you provide a [path glob](https://github.com/isaacs/minimatch#minimatch), and for the branches you provide a regexp to match against the branch name.
|
||||
|
||||
The base match object is defined as:
|
||||
```yml
|
||||
- any: ['list', 'of', 'globs']
|
||||
all: ['list', 'of', 'globs']
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['list', 'of', 'globs']
|
||||
- any-glob-to-all-files: ['list', 'of', 'globs']
|
||||
- all-globs-to-any-file: ['list', 'of', 'globs']
|
||||
- all-globs-to-all-files: ['list', 'of', 'globs']
|
||||
- base-branch: ['list', 'of', 'regexps']
|
||||
- head-branch: ['list', 'of', 'regexps']
|
||||
```
|
||||
|
||||
One or both fields can be provided for fine-grained matching. Unlike the top-level list, the list of path globs provided to `any` and `all` must ALL match against a path for the label to be applied.
|
||||
|
||||
The fields are defined as follows:
|
||||
* `any`: match ALL globs against ANY changed path
|
||||
* `all`: match ALL globs against ALL changed paths
|
||||
|
||||
A simple path glob is the equivalent to `any: ['glob']`. More specifically, the following two configurations are equivalent:
|
||||
There are two top-level keys, `any` and `all`, which both accept the same configuration options:
|
||||
```yml
|
||||
label1:
|
||||
- example1/*
|
||||
- any:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['list', 'of', 'globs']
|
||||
- any-glob-to-all-files: ['list', 'of', 'globs']
|
||||
- all-globs-to-any-file: ['list', 'of', 'globs']
|
||||
- all-globs-to-all-files: ['list', 'of', 'globs']
|
||||
- base-branch: ['list', 'of', 'regexps']
|
||||
- head-branch: ['list', 'of', 'regexps']
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['list', 'of', 'globs']
|
||||
- any-glob-to-all-files: ['list', 'of', 'globs']
|
||||
- all-globs-to-any-file: ['list', 'of', 'globs']
|
||||
- all-globs-to-all-files: ['list', 'of', 'globs']
|
||||
- base-branch: ['list', 'of', 'regexps']
|
||||
- head-branch: ['list', 'of', 'regexps']
|
||||
```
|
||||
|
||||
From a boolean logic perspective, top-level match objects, and options within `all` are `AND`-ed together and individual match rules within the `any` object are `OR`-ed.
|
||||
|
||||
One or all fields can be provided for fine-grained matching.
|
||||
The fields are defined as follows:
|
||||
- `all`: ALL of the provided options must match for the label to be applied
|
||||
- `any`: if ANY of the provided options match then the label will be applied
|
||||
- `base-branch`: match regexps against the base branch name
|
||||
- `head-branch`: match regexps against the head branch name
|
||||
- `changed-files`: match glob patterns against the changed paths
|
||||
- `any-glob-to-any-file`: ANY glob must match against ANY changed file
|
||||
- `any-glob-to-all-files`: ANY glob must match against ALL changed files
|
||||
- `all-globs-to-any-file`: ALL globs must match against ANY changed file
|
||||
- `all-globs-to-all-files`: ALL globs must match against ALL changed files
|
||||
|
||||
If a base option is provided without a top-level key, then it will default to `any`. More specifically, the following two configurations are equivalent:
|
||||
```yml
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'docs/*'
|
||||
```
|
||||
and
|
||||
```yml
|
||||
label1:
|
||||
- any: ['example1/*']
|
||||
Documentation:
|
||||
- any:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'docs/*'
|
||||
```
|
||||
|
||||
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.
|
||||
If path globs are combined with `!` negation, you can write complex matching rules. See the examples below for more information.
|
||||
|
||||
#### Basic Examples
|
||||
|
||||
```yml
|
||||
# Add 'label1' to any changes within 'example' folder or any subfolders
|
||||
label1:
|
||||
- example/**
|
||||
# Add 'root' label to any root file changes
|
||||
# Quotation marks are required for the leading asterisk
|
||||
root:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '*'
|
||||
|
||||
# Add 'label2' to any file changes within 'example2' folder
|
||||
label2: example2/*
|
||||
# Add 'AnyChange' label to any changes within the entire repository
|
||||
AnyChange:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '**'
|
||||
|
||||
# Add label3 to any change to .txt files within the entire repository. Quotation marks are required for the leading asterisk
|
||||
label3:
|
||||
- '**/*.txt'
|
||||
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: docs/**
|
||||
|
||||
```
|
||||
# Add 'Documentation' label to any file changes within 'docs' folder
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: docs/*
|
||||
|
||||
#### Common Examples
|
||||
# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- docs/*
|
||||
- guides/*
|
||||
|
||||
```yml
|
||||
# Add 'repo' label to any root file changes
|
||||
repo:
|
||||
- '*'
|
||||
## Equivalent of the above mentioned configuration using another syntax
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['docs/*', 'guides/*']
|
||||
|
||||
# Add '@domain/core' label to any change within the 'core' package
|
||||
'@domain/core':
|
||||
- package/core/**
|
||||
|
||||
# Add 'test' label to any change to *.spec.js files within the source dir
|
||||
test:
|
||||
- src/**/*.spec.js
|
||||
# Add 'Documentation' label to any change to .md files within the entire repository
|
||||
Documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '**/*.md'
|
||||
|
||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||
source:
|
||||
- any: ['src/**', '!src/docs/*']
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/**/*'
|
||||
- all-globs-to-all-files: '!src/docs/*'
|
||||
|
||||
# Add 'frontend` label to any change to *.js files as long as the `main.js` hasn't changed
|
||||
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
|
||||
feature:
|
||||
- head-branch: ['^feature', 'feature']
|
||||
|
||||
# Add 'release' label to any PR that is opened against the `main` branch
|
||||
release:
|
||||
- base-branch: 'main'
|
||||
```
|
||||
|
||||
#### Configuration Options
|
||||
|
||||
The labeler configuration file (`.github/labeler.yml`) supports the following top-level options:
|
||||
|
||||
| Name | Description |
|
||||
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `changed-files-labels-limit` | Maximum number of new labels to apply based on changed files (must be a non-negative integer). If exceeded, no changed-files labels are applied for that run. |
|
||||
| `max-files-changed` | Maximum number of total changed files (must be a non-negative integer). If exceeded, all file-based labeling is skipped. |
|
||||
|
||||
##### Limiting changed-files labels
|
||||
|
||||
When working with large PRs (e.g., tree-wide refactors) that touch many components, you may want to prevent the labeler from adding too many labels. Set `changed-files-labels-limit` in your `.github/labeler.yml` configuration file to limit the number of labels that can be applied based on changed files patterns.
|
||||
|
||||
**Important behaviors:**
|
||||
|
||||
- The limit counts only **new** labels that would be added by changed-files rules. Labels already present on the PR are not counted toward the limit.
|
||||
- If the number of new changed-files labels **exceeds** the limit, **all** new changed-files labels are skipped for that run.
|
||||
- If the number of new changed-files labels **equals** the limit, labels are still applied normally.
|
||||
- Labels based on branch conditions (`head-branch`, `base-branch`) are **not affected** by the limit.
|
||||
- **Any label definition that includes a `changed-files` rule is considered a changed-files label** and is subject to the limit, regardless of which condition caused the label to match. For example, a label with both `head-branch` and `changed-files` rules will be subject to the limit even if it matches via the branch rule.
|
||||
- If both `max-files-changed` and `changed-files-labels-limit` are configured at the same time, `max-files-changed` is evaluated first, and if it triggers, `changed-files-labels-limit` is not evaluated.
|
||||
|
||||
##### Example
|
||||
|
||||
```yml
|
||||
# .github/labeler.yml
|
||||
|
||||
# Limit changed-files based labels to 5
|
||||
changed-files-labels-limit: 5
|
||||
|
||||
# Label definitions - these are subject to the limit
|
||||
frontend:
|
||||
- any: ['src/**/*.js']
|
||||
all: ['!src/main.js']
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/frontend/**'
|
||||
|
||||
# Add the 'AnyChange' label to any changes within the entire repository if the 'dot' option is set to 'false'
|
||||
AnyChange:
|
||||
- '**'
|
||||
- '**/.*'
|
||||
- '**/.*/**'
|
||||
- '**/.*/**/.*'
|
||||
backend:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/backend/**'
|
||||
|
||||
# Add the 'AnyChange' label to any changes within the entire repository if the 'dot' option is set to 'true'
|
||||
AnyChange:
|
||||
- '**'
|
||||
docs:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'docs/**'
|
||||
|
||||
# This label has both branch and changed-files rules.
|
||||
# It is still subject to the limit because it includes changed-files.
|
||||
mixed:
|
||||
- any:
|
||||
- head-branch: '^feature/'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/mixed/**'
|
||||
|
||||
# Branch-based labels are NOT affected by the limit
|
||||
feature:
|
||||
- head-branch: '^feature/'
|
||||
```
|
||||
|
||||
##### Skipping labeling for large PRs
|
||||
|
||||
When a PR modifies a very large number of files (e.g., tree-wide refactors, automated code formatting), you may want to skip file-based labeling entirely. Set `max-files-changed` in your `.github/labeler.yml` configuration file to skip all file-based labeling when the total number of changed files exceeds the threshold.
|
||||
|
||||
**Important behaviors:**
|
||||
|
||||
- If the total number of changed files **exceeds** the limit, all file-based labeling is skipped entirely.
|
||||
- If the total number of changed files **equals** the limit, labels are still applied normally.
|
||||
- Labels based **only** on branch conditions (`head-branch`, `base-branch`) are **not affected** by the limit.
|
||||
- **Any label definition that includes a `changed-files` rule is considered a file-based label** and will be skipped, regardless of which condition caused the label to match. For example, a label with both `head-branch` and `changed-files` rules will be skipped even if it would match via the branch rule.
|
||||
- Pre-existing labels on the PR are **preserved** — changed-files configs are not evaluated at all, so `sync-labels` will not remove them.
|
||||
|
||||
##### Example
|
||||
|
||||
```yml
|
||||
# .github/labeler.yml
|
||||
|
||||
# Skip file-based labeling if more than 100 files changed
|
||||
max-files-changed: 100
|
||||
|
||||
# These labels will be skipped if > 100 files changed
|
||||
frontend:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/frontend/**'
|
||||
|
||||
backend:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'src/backend/**'
|
||||
|
||||
# Branch-based labels are NOT affected
|
||||
release:
|
||||
- base-branch: 'main'
|
||||
```
|
||||
|
||||
### Create Workflow
|
||||
|
||||
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:
|
||||
Create a workflow (e.g. `.github/workflows/labeler.yml` see [Creating a Workflow file](https://docs.github.com/en/actions/writing-workflows/quickstart#creating-your-first-workflow)) to utilize the labeler action with content:
|
||||
|
||||
```yml
|
||||
name: "Pull Request Labeler"
|
||||
@@ -107,13 +257,13 @@ on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
- uses: actions/labeler@v6
|
||||
```
|
||||
|
||||
#### Inputs
|
||||
@@ -122,41 +272,41 @@ Various inputs are defined in [`action.yml`](action.yml) to let you configure th
|
||||
|
||||
| Name | Description | Default |
|
||||
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret | N/A |
|
||||
| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret | `github.token` |
|
||||
| `configuration-path` | The path to the label configuration file. If the file doesn't exist at the specified path on the runner, action will read from the source repository via the Github API. | `.github/labeler.yml` |
|
||||
| `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` |
|
||||
| `sync-labels` | Whether to remove configured labels when they no longer match. Labels not present in the labeler configuration are never removed. | `false` |
|
||||
| `dot` | Whether or not to auto-include paths starting with dot (e.g. `.github`) | `true` |
|
||||
| `pr-number` | The number(s) of pull request to update, rather than detecting from the workflow context | N/A |
|
||||
|
||||
When `sync-labels` is enabled, labeler synchronizes only labels whose names are
|
||||
present in the labeler configuration. Matching configured labels are added in
|
||||
one batch, and configured labels that no longer match are removed in one batch.
|
||||
Other labels, including labels added by users or other automation, are not
|
||||
rewritten or removed.
|
||||
|
||||
Removals and additions use separate API requests, so configured labels may be
|
||||
temporarily absent while a synchronization swaps stale labels for newly matching
|
||||
labels. Swaps can take longer than updates requiring only additions or removals
|
||||
because these requests run sequentially. At GitHub's 100-label limit, labels
|
||||
added concurrently between those requests can prevent all newly matching
|
||||
configured labels from being added; labeler does not remove unconfigured labels
|
||||
to make room.
|
||||
|
||||
##### Using `configuration-path` input together with the `@actions/checkout` action
|
||||
You might want to use action called [@actions/checkout](https://github.com/actions/checkout) to upload label configuration file onto the runner from the current or any other repositories. See usage example below:
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v3 # Uploads repository content to the runner
|
||||
- uses: actions/checkout@v5 # Uploads repository content to the runner
|
||||
with:
|
||||
repository: "owner/repositoryName" # The one of the available inputs, visit https://github.com/actions/checkout#readme to find more
|
||||
- uses: actions/labeler@v4
|
||||
- uses: actions/labeler@v6
|
||||
with:
|
||||
configuration-path: 'path/to/the/uploaded/configuration/file'
|
||||
|
||||
```
|
||||
|
||||
##### Peculiarities of using the `dot` input
|
||||
|
||||
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/**
|
||||
```
|
||||
|
||||
##### Example workflow specifying Pull request numbers
|
||||
##### Example workflow specifying pull request numbers
|
||||
|
||||
```yml
|
||||
name: "Label Previous Pull Requests"
|
||||
@@ -165,17 +315,16 @@ on:
|
||||
- cron: "0 1 * * 1"
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
|
||||
# Label PRs 1, 2, and 3
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
- uses: actions/labeler@v6
|
||||
with:
|
||||
pr-number: |
|
||||
1
|
||||
2
|
||||
@@ -184,38 +333,42 @@ jobs:
|
||||
|
||||
**Note:** in normal usage the `pr-number` input is not required as the action will detect the PR number from the workflow context.
|
||||
|
||||
#### Outputs
|
||||
|
||||
#### Outputs
|
||||
|
||||
Labeler provides the following 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 outputs are calculated from the pull request label snapshot used by the
|
||||
action and the label changes it successfully applies. A label added
|
||||
concurrently by another actor is preserved, but may not appear in the outputs
|
||||
for that run.
|
||||
|
||||
The following example performs steps based on the output of labeler:
|
||||
```yml
|
||||
name: "My workflow"
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: label-the-PR
|
||||
uses: actions/labeler@v4
|
||||
|
||||
uses: actions/labeler@v6
|
||||
|
||||
- id: run-frontend-tests
|
||||
if: contains(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(steps.label-the-PR.outputs.all-labels, 'backend')
|
||||
run: |
|
||||
@@ -223,24 +376,60 @@ jobs:
|
||||
# Put your commands for running backend tests here
|
||||
```
|
||||
|
||||
## Permissions
|
||||
## Recommended 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.
|
||||
To successfully add labels to pull requests using the GitHub Labeler Action, specific permissions must be granted based on your use case:
|
||||
|
||||
1. **Adding Existing Labels**:
|
||||
- Requires: `pull-requests: write`
|
||||
- Use this if all labels already exist in the repository (i.e., pre-defined in `.github/labeler.yml`).
|
||||
|
||||
2. **Creating New Labels**:
|
||||
- Requires: `issues: write`
|
||||
- This is necessary if the action needs to create labels that do not already exist in the repository.
|
||||
|
||||
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.
|
||||
|
||||
There exists a potentially dangerous misuse of the `pull_request_target` workflow trigger that may lead to malicious PR authors (i.e. attackers) being able to obtain repository write permissions or stealing repository secrets. Hence, it is advisable that `pull_request_target` should only be used in workflows that are carefully designed to avoid executing untrusted code and to also ensure that workflows using `pull_request_target` limit access to sensitive resources. 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.
|
||||
|
||||
### Example Workflow Permissions
|
||||
|
||||
To ensure the action works correctly, include the following permissions in your workflow file:
|
||||
|
||||
```yml
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
```
|
||||
|
||||
### Manual Label Creation as an Alternative to Granting issues write Permission
|
||||
|
||||
If you prefer not to grant the `issues: write` permission in your workflow, you can manually create all required labels in the repository before the action runs.
|
||||
|
||||
## Notes regarding `pull_request_target` event
|
||||
|
||||
Using the `pull_request_target` event trigger involves several peculiarities related to initial set up of the labeler or updating version of the labeler.
|
||||
|
||||
### Initial set up of the labeler action
|
||||
|
||||
When submitting an initial pull request to a repository using the `pull_request_target` event, the labeler workflow will not run on that pull request because the `pull_request_target` execution runs off the base branch instead of the pull request's branch. Unfortunately this means the introduction of the labeler can not be verified during that pull request and it needs to be committed blindly.
|
||||
|
||||
### Updating major version of the labeler
|
||||
|
||||
When submitting a pull request that includes updates of the labeler action version and associated configuration files, using the `pull_request_target` event may result in a failed workflow. This is due to the nature of `pull_request_target`, which uses the code from the base branch rather than the branch linked to the pull request — so, potentially outdated configuration files may not be compatible with the updated labeler action.
|
||||
|
||||
To prevent this issue, you can switch to using the `pull_request` event temporarily, before merging. This event execution draws from the code within the branch of your pull request, allowing you to verify the new configuration's compatibility with the updated labeler action.
|
||||
|
||||
```yml
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request
|
||||
```
|
||||
|
||||
Once you confirm that the updated configuration files function as intended, you can then revert to using the `pull_request_target` event before merging the pull request. Following this step ensures that your workflow is robust and free from disruptions.
|
||||
|
||||
## Contributions
|
||||
|
||||
Contributions are welcome! See the [Contributor's Guide](CONTRIBUTING.md).
|
||||
Contributions are welcome! See the [Contributor's Guide](CONTRIBUTING.md).
|
||||
@@ -1,37 +0,0 @@
|
||||
export const context = {
|
||||
payload: {
|
||||
pull_request: {
|
||||
number: 123
|
||||
}
|
||||
},
|
||||
repo: {
|
||||
owner: 'monalisa',
|
||||
repo: 'helloworld'
|
||||
}
|
||||
};
|
||||
|
||||
const mockApi = {
|
||||
rest: {
|
||||
issues: {
|
||||
setLabels: jest.fn()
|
||||
},
|
||||
pulls: {
|
||||
get: jest.fn().mockResolvedValue({
|
||||
data: {
|
||||
labels: []
|
||||
}
|
||||
}),
|
||||
listFiles: {
|
||||
endpoint: {
|
||||
merge: jest.fn().mockReturnValue({})
|
||||
}
|
||||
}
|
||||
},
|
||||
repos: {
|
||||
getContent: jest.fn()
|
||||
}
|
||||
},
|
||||
paginate: jest.fn()
|
||||
};
|
||||
|
||||
export const getOctokit = jest.fn().mockImplementation(() => mockApi);
|
||||
@@ -0,0 +1,131 @@
|
||||
import {jest, describe, it, expect} from '@jest/globals';
|
||||
import type {ClientType} from '../src/api/types.js';
|
||||
|
||||
jest.unstable_mockModule('@actions/github', () => ({
|
||||
context: {
|
||||
repo: {owner: 'monalisa', repo: 'helloworld'}
|
||||
}
|
||||
}));
|
||||
|
||||
const {addLabels} = await import('../src/api/add-labels.js');
|
||||
|
||||
const createClient = () => {
|
||||
const addLabelsMock = jest.fn<any>();
|
||||
const listLabelsOnIssueMock = jest.fn<any>();
|
||||
const client = {
|
||||
rest: {
|
||||
issues: {
|
||||
addLabels: addLabelsMock,
|
||||
listLabelsOnIssue: listLabelsOnIssueMock
|
||||
}
|
||||
}
|
||||
} as ClientType;
|
||||
|
||||
return {client, addLabelsMock, listLabelsOnIssueMock};
|
||||
};
|
||||
|
||||
describe('addLabels', () => {
|
||||
it('does not verify a successful addition', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
addLabelsMock.mockResolvedValue({data: []});
|
||||
|
||||
await addLabels(client, 123, ['bug']);
|
||||
|
||||
expect(addLabelsMock).toHaveBeenCalledWith({
|
||||
owner: 'monalisa',
|
||||
repo: 'helloworld',
|
||||
issue_number: 123,
|
||||
labels: ['bug'],
|
||||
request: {retries: 0}
|
||||
});
|
||||
expect(listLabelsOnIssueMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('accepts a server error when every requested label was committed', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
const serverError = Object.assign(new Error('Bad Gateway'), {status: 502});
|
||||
addLabelsMock.mockRejectedValue(serverError);
|
||||
listLabelsOnIssueMock.mockResolvedValue({
|
||||
data: [{name: 'BUG'}, {name: 'documentation'}],
|
||||
headers: {}
|
||||
});
|
||||
|
||||
await expect(
|
||||
addLabels(client, 123, ['bug', 'documentation'])
|
||||
).resolves.toBeUndefined();
|
||||
expect(listLabelsOnIssueMock).toHaveBeenCalledWith({
|
||||
owner: 'monalisa',
|
||||
repo: 'helloworld',
|
||||
issue_number: 123,
|
||||
per_page: 100,
|
||||
page: 1,
|
||||
request: {retries: 0}
|
||||
});
|
||||
});
|
||||
|
||||
it('checks subsequent pages after a committed server error', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
const serverError = Object.assign(new Error('Bad Gateway'), {status: 502});
|
||||
addLabelsMock.mockRejectedValue(serverError);
|
||||
listLabelsOnIssueMock
|
||||
.mockResolvedValueOnce({
|
||||
data: Array.from({length: 100}, (_, index) => ({
|
||||
name: `label-${index}`
|
||||
})),
|
||||
headers: {
|
||||
link: '<https://api.github.com/issues/123/labels?page=2>; rel="next"'
|
||||
}
|
||||
})
|
||||
.mockResolvedValueOnce({
|
||||
data: [{name: 'documentation'}],
|
||||
headers: {}
|
||||
});
|
||||
|
||||
await expect(
|
||||
addLabels(client, 123, ['label-0', 'documentation'])
|
||||
).resolves.toBeUndefined();
|
||||
expect(listLabelsOnIssueMock).toHaveBeenNthCalledWith(2, {
|
||||
owner: 'monalisa',
|
||||
repo: 'helloworld',
|
||||
issue_number: 123,
|
||||
per_page: 100,
|
||||
page: 2,
|
||||
request: {retries: 0}
|
||||
});
|
||||
});
|
||||
|
||||
it('preserves a server error when any requested label is missing', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
const serverError = Object.assign(new Error('Bad Gateway'), {status: 502});
|
||||
addLabelsMock.mockRejectedValue(serverError);
|
||||
listLabelsOnIssueMock.mockResolvedValue({
|
||||
data: [{name: 'bug'}],
|
||||
headers: {}
|
||||
});
|
||||
|
||||
await expect(addLabels(client, 123, ['bug', 'documentation'])).rejects.toBe(
|
||||
serverError
|
||||
);
|
||||
expect(listLabelsOnIssueMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('does not verify non-server errors', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
const validationError = Object.assign(new Error('Validation Failed'), {
|
||||
status: 422
|
||||
});
|
||||
addLabelsMock.mockRejectedValue(validationError);
|
||||
|
||||
await expect(addLabels(client, 123, ['bug'])).rejects.toBe(validationError);
|
||||
expect(listLabelsOnIssueMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('preserves the server error when verification fails', async () => {
|
||||
const {client, addLabelsMock, listLabelsOnIssueMock} = createClient();
|
||||
const serverError = Object.assign(new Error('Bad Gateway'), {status: 502});
|
||||
addLabelsMock.mockRejectedValue(serverError);
|
||||
listLabelsOnIssueMock.mockRejectedValue(new Error('Service unavailable'));
|
||||
|
||||
await expect(addLabels(client, 123, ['bug'])).rejects.toBe(serverError);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,227 @@
|
||||
import {jest, describe, beforeEach, it, expect} from '@jest/globals';
|
||||
import type {BranchMatchConfig} from '../src/branch.js';
|
||||
|
||||
jest.unstable_mockModule('@actions/core', () => ({
|
||||
debug: jest.fn(),
|
||||
info: jest.fn(),
|
||||
warning: jest.fn(),
|
||||
error: jest.fn()
|
||||
}));
|
||||
|
||||
const mockGithubContext = {
|
||||
payload: {
|
||||
pull_request: {
|
||||
number: 123,
|
||||
head: {ref: 'head-branch-name'},
|
||||
base: {ref: 'base-branch-name'}
|
||||
}
|
||||
},
|
||||
repo: {owner: 'monalisa', repo: 'helloworld'}
|
||||
} as any;
|
||||
|
||||
jest.unstable_mockModule('@actions/github', () => ({
|
||||
context: mockGithubContext,
|
||||
getOctokit: jest.fn()
|
||||
}));
|
||||
|
||||
const {getBranchName, checkAnyBranch, checkAllBranch, toBranchMatchConfig} =
|
||||
await import('../src/branch.js');
|
||||
|
||||
describe('getBranchName', () => {
|
||||
describe('when the pull requests base branch is requested', () => {
|
||||
it('returns the base branch name', () => {
|
||||
const result = getBranchName('base');
|
||||
expect(result).toEqual('base-branch-name');
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the pull requests head branch is requested', () => {
|
||||
it('returns the head branch name', () => {
|
||||
const result = getBranchName('head');
|
||||
expect(result).toEqual('head-branch-name');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkAllBranch', () => {
|
||||
beforeEach(() => {
|
||||
mockGithubContext.payload.pull_request.head = {
|
||||
ref: 'test/feature/123'
|
||||
};
|
||||
mockGithubContext.payload.pull_request.base = {
|
||||
ref: 'main'
|
||||
};
|
||||
});
|
||||
|
||||
describe('when a single pattern is provided', () => {
|
||||
describe('and the pattern matches the head branch', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAllBranch(['^test'], 'head');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the pattern does not match the head branch', () => {
|
||||
it('returns false', () => {
|
||||
const result = checkAllBranch(['^feature/'], 'head');
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when multiple patterns are provided', () => {
|
||||
describe('and not all patterns matched', () => {
|
||||
it('returns false', () => {
|
||||
const result = checkAllBranch(['^test/', '^feature/'], 'head');
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and all patterns match', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAllBranch(['^test/', '/feature/'], 'head');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and no patterns match', () => {
|
||||
it('returns false', () => {
|
||||
const result = checkAllBranch(['^feature/', '/test$'], 'head');
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the branch to check is specified as the base branch', () => {
|
||||
describe('and the pattern matches the base branch', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAllBranch(['^main$'], 'base');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkAnyBranch', () => {
|
||||
beforeEach(() => {
|
||||
mockGithubContext.payload.pull_request.head = {
|
||||
ref: 'test/feature/123'
|
||||
};
|
||||
mockGithubContext.payload.pull_request.base = {
|
||||
ref: 'main'
|
||||
};
|
||||
});
|
||||
|
||||
describe('when a single pattern is provided', () => {
|
||||
describe('and the pattern matches the head branch', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAnyBranch(['^test'], 'head');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the pattern does not match the head branch', () => {
|
||||
it('returns false', () => {
|
||||
const result = checkAnyBranch(['^feature/'], 'head');
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when multiple patterns are provided', () => {
|
||||
describe('and at least one pattern matches', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAnyBranch(['^test/', '^feature/'], 'head');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and all patterns match', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAnyBranch(['^test/', '/feature/'], 'head');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and no patterns match', () => {
|
||||
it('returns false', () => {
|
||||
const result = checkAnyBranch(['^feature/', '/test$'], 'head');
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the branch to check is specified as the base branch', () => {
|
||||
describe('and the pattern matches the base branch', () => {
|
||||
it('returns true', () => {
|
||||
const result = checkAnyBranch(['^main$'], 'base');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('toBranchMatchConfig', () => {
|
||||
describe('when there are no branch keys in the config', () => {
|
||||
const config = {'changed-files': [{any: ['testing']}]};
|
||||
|
||||
it('returns an empty object', () => {
|
||||
const result = toBranchMatchConfig(config);
|
||||
expect(result).toEqual({});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the config contains a head-branch option', () => {
|
||||
const config = {'head-branch': ['testing']};
|
||||
|
||||
it('sets headBranch in the matchConfig', () => {
|
||||
const result = toBranchMatchConfig(config);
|
||||
expect(result).toEqual({
|
||||
headBranch: ['testing']
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the matching option is a string', () => {
|
||||
const stringConfig = {'head-branch': 'testing'};
|
||||
|
||||
it('sets headBranch in the matchConfig', () => {
|
||||
const result = toBranchMatchConfig(stringConfig);
|
||||
expect(result).toEqual({
|
||||
headBranch: ['testing']
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the config contains a base-branch option', () => {
|
||||
const config = {'base-branch': ['testing']};
|
||||
it('sets baseBranch in the matchConfig', () => {
|
||||
const result = toBranchMatchConfig(config);
|
||||
expect(result).toEqual({
|
||||
baseBranch: ['testing']
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the matching option is a string', () => {
|
||||
const stringConfig = {'base-branch': 'testing'};
|
||||
|
||||
it('sets baseBranch in the matchConfig', () => {
|
||||
const result = toBranchMatchConfig(stringConfig);
|
||||
expect(result).toEqual({
|
||||
baseBranch: ['testing']
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the config contains both a base-branch and head-branch option', () => {
|
||||
const config = {'base-branch': ['testing'], 'head-branch': ['testing']};
|
||||
it('sets headBranch and baseBranch in the matchConfig', () => {
|
||||
const result = toBranchMatchConfig(config);
|
||||
expect(result).toEqual({
|
||||
baseBranch: ['testing'],
|
||||
headBranch: ['testing']
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,286 @@
|
||||
import {jest, describe, it, expect} from '@jest/globals';
|
||||
import type {ChangedFilesMatchConfig} from '../src/changedFiles.js';
|
||||
|
||||
jest.unstable_mockModule('@actions/core', () => ({
|
||||
debug: jest.fn(),
|
||||
info: jest.fn(),
|
||||
warning: jest.fn(),
|
||||
error: jest.fn()
|
||||
}));
|
||||
|
||||
jest.unstable_mockModule('@actions/github', () => ({
|
||||
context: {
|
||||
payload: {
|
||||
pull_request: {number: 123, head: {ref: 'head'}, base: {ref: 'base'}}
|
||||
},
|
||||
repo: {owner: 'monalisa', repo: 'helloworld'}
|
||||
},
|
||||
getOctokit: jest.fn()
|
||||
}));
|
||||
|
||||
const {
|
||||
checkAllChangedFiles,
|
||||
checkAnyChangedFiles,
|
||||
toChangedFilesMatchConfig,
|
||||
checkIfAnyGlobMatchesAnyFile,
|
||||
checkIfAllGlobsMatchAnyFile,
|
||||
checkIfAnyGlobMatchesAllFiles,
|
||||
checkIfAllGlobsMatchAllFiles
|
||||
} = await import('../src/changedFiles.js');
|
||||
|
||||
describe('checkAllChangedFiles', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when all given glob pattern configs matched', () => {
|
||||
const globPatternsConfigs = [
|
||||
{anyGlobToAnyFile: ['foo.txt']},
|
||||
{anyGlobToAllFiles: ['*.txt']},
|
||||
{allGlobsToAllFiles: ['**']}
|
||||
];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkAllChangedFiles(
|
||||
changedFiles,
|
||||
globPatternsConfigs,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe(`when some given glob pattern config did not match`, () => {
|
||||
const globPatternsConfigs = [
|
||||
{anyGlobToAnyFile: ['*.md']},
|
||||
{anyGlobToAllFiles: ['*.txt']},
|
||||
{allGlobsToAllFiles: ['**']}
|
||||
];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkAllChangedFiles(
|
||||
changedFiles,
|
||||
globPatternsConfigs,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkAnyChangedFiles', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when any given glob pattern config matched', () => {
|
||||
const globPatternsConfigs = [
|
||||
{anyGlobToAnyFile: ['*.md']},
|
||||
{anyGlobToAllFiles: ['*.txt']}
|
||||
];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkAnyChangedFiles(
|
||||
changedFiles,
|
||||
globPatternsConfigs,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when none of the given glob pattern configs matched', () => {
|
||||
const globPatternsConfigs = [
|
||||
{anyGlobToAnyFile: ['*.md']},
|
||||
{anyGlobToAllFiles: ['!*.txt']}
|
||||
];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkAnyChangedFiles(
|
||||
changedFiles,
|
||||
globPatternsConfigs,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('toChangedFilesMatchConfig', () => {
|
||||
describe(`when there is no 'changed-files' key in the config`, () => {
|
||||
const config = {'head-branch': 'test'};
|
||||
|
||||
it('returns an empty object', () => {
|
||||
const result = toChangedFilesMatchConfig(config);
|
||||
expect(result).toEqual({});
|
||||
});
|
||||
});
|
||||
|
||||
describe(`when there is a 'changed-files' key in the config`, () => {
|
||||
describe('but the glob pattern config key is not provided', () => {
|
||||
const config = {'changed-files': ['bar']};
|
||||
|
||||
it('throws the error', () => {
|
||||
expect(() => {
|
||||
toChangedFilesMatchConfig(config);
|
||||
}).toThrow(
|
||||
`The "changed-files" section must have a valid config structure. Please read the action documentation for more information`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('but the glob pattern config key is not valid', () => {
|
||||
const config = {'changed-files': [{NotValidConfigKey: ['bar']}]};
|
||||
|
||||
it('throws the error', () => {
|
||||
expect(() => {
|
||||
toChangedFilesMatchConfig(config);
|
||||
}).toThrow(
|
||||
`Unknown config options were under "changed-files": NotValidConfigKey`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the glob pattern config key is provided', () => {
|
||||
describe('and the value is an array of strings', () => {
|
||||
const config = {
|
||||
'changed-files': [{'any-glob-to-any-file': ['testing']}]
|
||||
};
|
||||
|
||||
it('sets the value in the config object', () => {
|
||||
const result = toChangedFilesMatchConfig(config);
|
||||
expect(result).toEqual({
|
||||
changedFiles: [{anyGlobToAnyFile: ['testing']}]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the value is a string', () => {
|
||||
const config = {'changed-files': [{'any-glob-to-any-file': 'testing'}]};
|
||||
|
||||
it(`sets the string as an array in the config object`, () => {
|
||||
const result = toChangedFilesMatchConfig(config);
|
||||
expect(result).toEqual({
|
||||
changedFiles: [{anyGlobToAnyFile: ['testing']}]
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkIfAnyGlobMatchesAnyFile', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when any given glob pattern matched any file', () => {
|
||||
const globPatterns = ['*.md', 'foo.txt'];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkIfAnyGlobMatchesAnyFile(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when none of the given glob pattern matched any file', () => {
|
||||
const globPatterns = ['*.md', '!*.txt'];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkIfAnyGlobMatchesAnyFile(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkIfAllGlobsMatchAnyFile', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when all given glob patterns matched any file', () => {
|
||||
const globPatterns = ['**/bar.txt', 'bar.txt'];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkIfAllGlobsMatchAnyFile(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when some of the given glob patterns did not match any file', () => {
|
||||
const globPatterns = ['*.txt', '*.md'];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkIfAllGlobsMatchAnyFile(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkIfAnyGlobMatchesAllFiles', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when any given glob pattern matched all files', () => {
|
||||
const globPatterns = ['*.md', '*.txt'];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkIfAnyGlobMatchesAllFiles(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when none of the given glob patterns matched all files', () => {
|
||||
const globPatterns = ['*.md', 'bar.txt', 'foo.txt'];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkIfAnyGlobMatchesAllFiles(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkIfAllGlobsMatchAllFiles', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
describe('when all given glob patterns matched all files', () => {
|
||||
const globPatterns = ['*.txt', '**'];
|
||||
|
||||
it('returns true', () => {
|
||||
const result = checkIfAllGlobsMatchAllFiles(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when some of the given glob patterns did not match all files', () => {
|
||||
const globPatterns = ['**', 'foo.txt'];
|
||||
|
||||
it('returns false', () => {
|
||||
const result = checkIfAllGlobsMatchAllFiles(
|
||||
changedFiles,
|
||||
globPatterns,
|
||||
false
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
label1:
|
||||
- any:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['glob']
|
||||
- head-branch: ['regexp']
|
||||
- base-branch: ['regexp']
|
||||
- all:
|
||||
- changed-files:
|
||||
- all-globs-to-all-files: ['glob']
|
||||
- head-branch: ['regexp']
|
||||
- base-branch: ['regexp']
|
||||
|
||||
label2:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['glob']
|
||||
- head-branch: ['regexp']
|
||||
- base-branch: ['regexp']
|
||||
@@ -0,0 +1,8 @@
|
||||
tests:
|
||||
- any:
|
||||
- head-branch: ['^tests/', '^test/']
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['tests/**/*']
|
||||
- all:
|
||||
- changed-files:
|
||||
- all-globs-to-all-files: ['!tests/requirements.txt']
|
||||
@@ -0,0 +1,11 @@
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
|
||||
bug-branch:
|
||||
- head-branch: '^bug/|fix/'
|
||||
|
||||
array-branch:
|
||||
- head-branch: ['^array/']
|
||||
@@ -0,0 +1,18 @@
|
||||
# Limit to 0 changed-files labels (none allowed)
|
||||
changed-files-labels-limit: 0
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
# Labels based on branch patterns only
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
@@ -0,0 +1,26 @@
|
||||
# Limit to 1 changed-files label
|
||||
changed-files-labels-limit: 1
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
component-c:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/c/**']
|
||||
|
||||
component-d:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/d/**']
|
||||
|
||||
# Labels based on branch patterns only
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
@@ -0,0 +1,26 @@
|
||||
# Limit to 2 changed-files labels
|
||||
changed-files-labels-limit: 2
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
component-c:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/c/**']
|
||||
|
||||
component-d:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/d/**']
|
||||
|
||||
# Labels based on branch patterns only
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
@@ -0,0 +1,26 @@
|
||||
# Limit to 3 changed-files labels
|
||||
changed-files-labels-limit: 3
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
component-c:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/c/**']
|
||||
|
||||
component-d:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/d/**']
|
||||
|
||||
# Labels based on branch patterns only
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
@@ -0,0 +1,15 @@
|
||||
# Skip file-based labeling if more than 5 files changed
|
||||
max-files-changed: 5
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
component-c:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/c/**']
|
||||
@@ -0,0 +1,15 @@
|
||||
# Skip file-based labeling if more than 3 files changed
|
||||
max-files-changed: 3
|
||||
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
# Branch-based label (should not be affected)
|
||||
test-branch:
|
||||
- head-branch: ['^test/']
|
||||
@@ -0,0 +1,23 @@
|
||||
# Labels based on changed files
|
||||
component-a:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
component-b:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/b/**']
|
||||
|
||||
component-c:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/c/**']
|
||||
|
||||
component-d:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/d/**']
|
||||
|
||||
# Labels based on branch patterns only
|
||||
test-branch:
|
||||
- head-branch: '^test/'
|
||||
|
||||
feature-branch:
|
||||
- head-branch: '/feature/'
|
||||
@@ -0,0 +1,16 @@
|
||||
# Test fixture for mixed rules behavior
|
||||
# A label with both branch and changed-files rules is considered a "changed-files label"
|
||||
# and is subject to the limit, even if it matches via the branch rule
|
||||
changed-files-labels-limit: 0
|
||||
|
||||
# This label has both branch and changed-files rules
|
||||
# It should be subject to the limit even if matched via branch
|
||||
mixed-label:
|
||||
- any:
|
||||
- head-branch: '^test/'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['components/a/**']
|
||||
|
||||
# Pure branch-based label - not subject to limit
|
||||
pure-branch-label:
|
||||
- head-branch: '^test/'
|
||||
@@ -0,0 +1,3 @@
|
||||
label:
|
||||
- all:
|
||||
- unknown: 'this-is-not-supported'
|
||||
@@ -1,2 +1,3 @@
|
||||
touched-a-pdf-file:
|
||||
- any: ['*.pdf']
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['*.pdf']
|
||||
|
||||
+536
-27
@@ -1,43 +1,552 @@
|
||||
import {checkGlobs} from '../src/labeler';
|
||||
import {jest, describe, it, expect, beforeEach, beforeAll} from '@jest/globals';
|
||||
import * as yaml from 'js-yaml';
|
||||
import * as fs from 'fs';
|
||||
import type {
|
||||
MatchConfig,
|
||||
BaseMatchConfig
|
||||
} from '../src/api/get-label-configs.js';
|
||||
|
||||
import * as core from '@actions/core';
|
||||
// Define API mock functions at module level
|
||||
const getPullRequestsMock = jest.fn<any>();
|
||||
const getLabelConfigsMock = jest.fn<any>();
|
||||
const addLabelsMock = jest.fn<any>();
|
||||
const removeLabelsMock = jest.fn<any>();
|
||||
const getChangedFilesMock = jest.fn<any>();
|
||||
const getContentMock = jest.fn<any>();
|
||||
|
||||
jest.mock('@actions/core');
|
||||
jest.unstable_mockModule('@actions/core', () => ({
|
||||
getInput: jest.fn(),
|
||||
getMultilineInput: jest.fn(),
|
||||
getBooleanInput: jest.fn(),
|
||||
setOutput: jest.fn(),
|
||||
setFailed: jest.fn(),
|
||||
error: jest.fn(),
|
||||
warning: jest.fn(),
|
||||
info: jest.fn(),
|
||||
debug: jest.fn()
|
||||
}));
|
||||
|
||||
jest.unstable_mockModule('@actions/github', () => ({
|
||||
context: {
|
||||
payload: {
|
||||
pull_request: {
|
||||
number: 123,
|
||||
head: {ref: 'head-branch'},
|
||||
base: {ref: 'base-branch'}
|
||||
}
|
||||
},
|
||||
repo: {owner: 'monalisa', repo: 'helloworld'}
|
||||
},
|
||||
getOctokit: jest.fn()
|
||||
}));
|
||||
|
||||
jest.unstable_mockModule('../src/api/index.js', () => ({
|
||||
getPullRequests: getPullRequestsMock,
|
||||
getLabelConfigs: getLabelConfigsMock,
|
||||
addLabels: addLabelsMock,
|
||||
removeLabels: removeLabelsMock,
|
||||
getChangedFiles: getChangedFilesMock,
|
||||
getContent: getContentMock
|
||||
}));
|
||||
|
||||
const core = await import('@actions/core');
|
||||
const github = await import('@actions/github');
|
||||
const api = await import('../src/api/index.js');
|
||||
const {labeler, checkMatchConfigs} = await import('../src/labeler.js');
|
||||
const {
|
||||
toMatchConfig,
|
||||
getLabelConfigMapFromObject,
|
||||
getLabelConfigResultFromObject,
|
||||
configUsesChangedFiles
|
||||
} = await import('../src/api/get-label-configs.js');
|
||||
|
||||
beforeAll(() => {
|
||||
jest.spyOn(core, 'getInput').mockImplementation((name, options) => {
|
||||
return jest.requireActual('@actions/core').getInput(name, options);
|
||||
(core.getInput as jest.Mock).mockImplementation(() => undefined);
|
||||
});
|
||||
|
||||
const loadYaml = (filepath: string) => {
|
||||
const loadedFile = fs.readFileSync(filepath);
|
||||
const content = Buffer.from(loadedFile).toString();
|
||||
return yaml.load(content);
|
||||
};
|
||||
|
||||
describe('getLabelConfigMapFromObject', () => {
|
||||
const yamlObject = loadYaml('__tests__/fixtures/all_options.yml');
|
||||
const expected = new Map<string, MatchConfig[]>();
|
||||
expected.set('label1', [
|
||||
{
|
||||
any: [
|
||||
{changedFiles: [{anyGlobToAnyFile: ['glob']}]},
|
||||
{baseBranch: undefined, headBranch: ['regexp']},
|
||||
{baseBranch: ['regexp'], headBranch: undefined}
|
||||
]
|
||||
},
|
||||
{
|
||||
all: [
|
||||
{changedFiles: [{allGlobsToAllFiles: ['glob']}]},
|
||||
{baseBranch: undefined, headBranch: ['regexp']},
|
||||
{baseBranch: ['regexp'], headBranch: undefined}
|
||||
]
|
||||
}
|
||||
]);
|
||||
expected.set('label2', [
|
||||
{
|
||||
any: [
|
||||
{changedFiles: [{anyGlobToAnyFile: ['glob']}]},
|
||||
{baseBranch: undefined, headBranch: ['regexp']},
|
||||
{baseBranch: ['regexp'], headBranch: undefined}
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
||||
it('returns a MatchConfig', () => {
|
||||
const result = getLabelConfigMapFromObject(yamlObject);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
||||
it('ignores top-level options like changed-files-labels-limit and max-files-changed', () => {
|
||||
const configWithLimit = {
|
||||
'changed-files-labels-limit': 5,
|
||||
'max-files-changed': 100,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigMapFromObject(configWithLimit);
|
||||
expect(result.has('changed-files-labels-limit')).toBe(false);
|
||||
expect(result.has('max-files-changed')).toBe(false);
|
||||
expect(result.has('label1')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
const matchConfig = [{any: ['*.txt']}];
|
||||
|
||||
describe('checkGlobs', () => {
|
||||
it('returns true when our pattern does match changed files', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
const result = checkGlobs(changedFiles, matchConfig, false);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
describe('getLabelConfigResultFromObject', () => {
|
||||
it('extracts changed-files-labels-limit as a number', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': 5,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBe(5);
|
||||
expect(result.labelConfigs.has('label1')).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false when our pattern does not match changed files', () => {
|
||||
const changedFiles = ['foo.docx'];
|
||||
const result = checkGlobs(changedFiles, matchConfig, false);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
it('parses changed-files-labels-limit from string', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': '10',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBe(10);
|
||||
});
|
||||
|
||||
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('trims whitespace when parsing string values', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': ' 5 ',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBe(5);
|
||||
});
|
||||
|
||||
it('returns true for a file starting with dot if `dot` option is true', () => {
|
||||
const changedFiles = ['.foo.txt'];
|
||||
const result = checkGlobs(changedFiles, matchConfig, true);
|
||||
it('returns undefined changedFilesLimit when not set', () => {
|
||||
const config = {
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBeUndefined();
|
||||
});
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
it('throws error for invalid changed-files-labels-limit value', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': 'invalid',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/Invalid value for 'changed-files-labels-limit'/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws error for negative changed-files-labels-limit value', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': -1,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/must be a non-negative integer/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws error for string with trailing characters', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': '10abc',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/must be a non-negative integer/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws error for decimal string', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': '3.2',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/must be a non-negative integer/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws error for float number', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': 3.2,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/must be a non-negative integer/
|
||||
);
|
||||
});
|
||||
|
||||
it('accepts zero as a valid changed-files-labels-limit', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': 0,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBe(0);
|
||||
});
|
||||
|
||||
it('extracts max-files-changed as a number', () => {
|
||||
const config = {
|
||||
'max-files-changed': 100,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.maxFilesChanged).toBe(100);
|
||||
expect(result.labelConfigs.has('label1')).toBe(true);
|
||||
});
|
||||
|
||||
it('parses max-files-changed from string', () => {
|
||||
const config = {
|
||||
'max-files-changed': '50',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.maxFilesChanged).toBe(50);
|
||||
});
|
||||
|
||||
it('returns undefined maxFilesChanged when not set', () => {
|
||||
const config = {
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.maxFilesChanged).toBeUndefined();
|
||||
});
|
||||
|
||||
it('throws error for invalid max-files-changed value', () => {
|
||||
const config = {
|
||||
'max-files-changed': 'invalid',
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/Invalid value for 'max-files-changed'/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws error for negative max-files-changed value', () => {
|
||||
const config = {
|
||||
'max-files-changed': -1,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/must be a non-negative integer/
|
||||
);
|
||||
});
|
||||
|
||||
it('accepts zero as a valid max-files-changed', () => {
|
||||
const config = {
|
||||
'max-files-changed': 0,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.maxFilesChanged).toBe(0);
|
||||
});
|
||||
|
||||
it('supports both options together', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': 5,
|
||||
'max-files-changed': 100,
|
||||
label1: [{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}]
|
||||
};
|
||||
const result = getLabelConfigResultFromObject(config);
|
||||
expect(result.changedFilesLimit).toBe(5);
|
||||
expect(result.maxFilesChanged).toBe(100);
|
||||
});
|
||||
|
||||
it('throws a clear error when max-files-changed is used as a label', () => {
|
||||
const config = {
|
||||
'max-files-changed': [
|
||||
{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}
|
||||
]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/reserved top-level option and cannot be used as a label name/
|
||||
);
|
||||
});
|
||||
|
||||
it('throws a clear error when changed-files-labels-limit is used as a label', () => {
|
||||
const config = {
|
||||
'changed-files-labels-limit': [
|
||||
{'changed-files': [{'any-glob-to-any-file': ['*.txt']}]}
|
||||
]
|
||||
};
|
||||
expect(() => getLabelConfigResultFromObject(config)).toThrow(
|
||||
/reserved top-level option and cannot be used as a label name/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('toMatchConfig', () => {
|
||||
describe('when all expected config options are present', () => {
|
||||
const config = {
|
||||
'changed-files': [{'any-glob-to-any-file': ['testing-files']}],
|
||||
'head-branch': ['testing-head'],
|
||||
'base-branch': ['testing-base']
|
||||
};
|
||||
const expected: BaseMatchConfig = {
|
||||
changedFiles: [{anyGlobToAnyFile: ['testing-files']}],
|
||||
headBranch: ['testing-head'],
|
||||
baseBranch: ['testing-base']
|
||||
};
|
||||
|
||||
it('returns a MatchConfig object with all options', () => {
|
||||
const result = toMatchConfig(config);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
||||
describe('and there are also unexpected options present', () => {
|
||||
config['test-test'] = 'testing';
|
||||
|
||||
it('does not include the unexpected items in the returned MatchConfig object', () => {
|
||||
const result = toMatchConfig(config);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkMatchConfigs', () => {
|
||||
describe('when a single match config is provided', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{any: [{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]}]}
|
||||
];
|
||||
|
||||
it('returns true when our pattern does match changed files', () => {
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
const result = checkMatchConfigs(changedFiles, matchConfig, false);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('returns false when our pattern does not match changed files', () => {
|
||||
const changedFiles = ['foo.docx'];
|
||||
const result = checkMatchConfigs(changedFiles, matchConfig, false);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('returns true when either the branch or changed files patter matches', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{
|
||||
any: [
|
||||
{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]},
|
||||
{headBranch: ['some-branch']}
|
||||
]
|
||||
}
|
||||
];
|
||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||
|
||||
const result = checkMatchConfigs(changedFiles, matchConfig, false);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false for a file starting with dot if `dot` option is false', () => {
|
||||
const changedFiles = ['.foo.txt'];
|
||||
const result = checkMatchConfigs(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 = checkMatchConfigs(changedFiles, matchConfig, true);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('when multiple MatchConfigs are supplied', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{any: [{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]}]},
|
||||
{any: [{headBranch: ['some-branch']}]}
|
||||
];
|
||||
const changedFiles = ['foo.txt', 'bar.md'];
|
||||
|
||||
it('returns false when only one config matches', () => {
|
||||
const result = checkMatchConfigs(changedFiles, matchConfig, false);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
|
||||
it('returns true when only both config matches', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{any: [{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]}]},
|
||||
{any: [{headBranch: ['head-branch']}]}
|
||||
];
|
||||
const result = checkMatchConfigs(changedFiles, matchConfig, false);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('configUsesChangedFiles', () => {
|
||||
it('returns true when config has changed-files in any block', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{any: [{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]}]}
|
||||
];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(true);
|
||||
});
|
||||
|
||||
it('returns true when config has changed-files in all block', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{all: [{changedFiles: [{allGlobsToAllFiles: ['*.txt']}]}]}
|
||||
];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false when config only has branch patterns', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{any: [{headBranch: ['^test/']}]},
|
||||
{any: [{baseBranch: ['main']}]}
|
||||
];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(false);
|
||||
});
|
||||
|
||||
it('returns false when config has empty changed-files array', () => {
|
||||
const matchConfig: MatchConfig[] = [{any: [{changedFiles: []}]}];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(false);
|
||||
});
|
||||
|
||||
it('returns false when config has changed-files with empty objects', () => {
|
||||
const matchConfig: MatchConfig[] = [{any: [{changedFiles: [{}]}]}];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(false);
|
||||
});
|
||||
|
||||
it('returns true when config has mixed branch and changed-files patterns', () => {
|
||||
const matchConfig: MatchConfig[] = [
|
||||
{
|
||||
any: [
|
||||
{changedFiles: [{anyGlobToAnyFile: ['*.txt']}]},
|
||||
{headBranch: ['^feature/']}
|
||||
]
|
||||
}
|
||||
];
|
||||
expect(configUsesChangedFiles(matchConfig)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('labeler error handling', () => {
|
||||
const mockClient = {} as any;
|
||||
const mockPullRequest = {
|
||||
number: 123,
|
||||
data: {labels: []},
|
||||
changedFiles: []
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
|
||||
(github.getOctokit as jest.Mock).mockReturnValue(mockClient);
|
||||
getPullRequestsMock.mockReturnValue([
|
||||
{
|
||||
...mockPullRequest,
|
||||
data: {labels: [{name: 'old-label'}]}
|
||||
}
|
||||
]);
|
||||
|
||||
getLabelConfigsMock.mockResolvedValue({
|
||||
labelConfigs: new Map([['new-label', ['dummy-config']]]),
|
||||
changedFilesLimit: undefined
|
||||
});
|
||||
|
||||
// Force match so "new-label" is always added
|
||||
jest.spyOn({checkMatchConfigs}, 'checkMatchConfigs').mockReturnValue(true);
|
||||
});
|
||||
|
||||
it('throws a custom error for HttpError 403 with "unauthorized" message', async () => {
|
||||
addLabelsMock.mockRejectedValue({
|
||||
name: 'HttpError',
|
||||
status: 403,
|
||||
message: 'Request failed with status code 403: Unauthorized'
|
||||
});
|
||||
|
||||
await expect(labeler()).rejects.toThrow(
|
||||
/does not have permission to create labels/
|
||||
);
|
||||
});
|
||||
|
||||
it('rethrows unexpected HttpError', async () => {
|
||||
const unexpectedError = {
|
||||
name: 'HttpError',
|
||||
status: 404,
|
||||
message: 'Not Found'
|
||||
};
|
||||
addLabelsMock.mockRejectedValue(unexpectedError);
|
||||
|
||||
// NOTE: In the current implementation, labeler rethrows the raw error object (not an Error instance).
|
||||
// `rejects.toThrow` only works with real Error objects, so here we must use `rejects.toEqual`.
|
||||
// If labeler is updated to always wrap errors in `Error`, this test can be changed to use `rejects.toThrow`.
|
||||
await expect(labeler()).rejects.toEqual(unexpectedError);
|
||||
});
|
||||
|
||||
it('handles "Resource not accessible by integration" gracefully', async () => {
|
||||
const error = {
|
||||
name: 'HttpError',
|
||||
message: 'Resource not accessible by integration'
|
||||
};
|
||||
addLabelsMock.mockRejectedValue(error);
|
||||
|
||||
await labeler();
|
||||
|
||||
expect(core.warning).toHaveBeenCalledWith(
|
||||
expect.stringContaining("requires 'issues: write'"),
|
||||
expect.any(Object)
|
||||
);
|
||||
expect(core.setFailed).toHaveBeenCalledWith(error.message);
|
||||
});
|
||||
|
||||
it('reports the configured labels when a bulk removal fails', async () => {
|
||||
(core.getBooleanInput as jest.Mock).mockReturnValue(true);
|
||||
getPullRequestsMock.mockReturnValue([
|
||||
{
|
||||
number: 123,
|
||||
data: {
|
||||
node_id: 'PR_node_id',
|
||||
labels: [{name: 'stale-label', node_id: 'label_node_id'}]
|
||||
},
|
||||
changedFiles: ['file.txt']
|
||||
}
|
||||
]);
|
||||
getLabelConfigsMock.mockResolvedValue({
|
||||
labelConfigs: new Map([
|
||||
[
|
||||
'stale-label',
|
||||
[{any: [{changedFiles: [{anyGlobToAnyFile: ['*.pdf']}]}]}]
|
||||
]
|
||||
]),
|
||||
changedFilesLimit: undefined
|
||||
});
|
||||
removeLabelsMock.mockRejectedValue(new Error('GraphQL request failed'));
|
||||
|
||||
await expect(labeler()).rejects.toThrow(
|
||||
"Failed to remove configured labels 'stale-label' from PR #123"
|
||||
);
|
||||
expect(addLabelsMock).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
+840
-52
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -11,12 +11,12 @@ inputs:
|
||||
default: '.github/labeler.yml'
|
||||
required: false
|
||||
sync-labels:
|
||||
description: 'Whether or not to remove labels when matching files are reverted'
|
||||
description: 'Whether to remove configured labels when they no longer match'
|
||||
default: false
|
||||
required: false
|
||||
dot:
|
||||
description: 'Whether or not to auto-include paths starting with dot (e.g. `.github`)'
|
||||
default: false
|
||||
default: true
|
||||
required: false
|
||||
pr-number:
|
||||
description: 'The pull request number(s)'
|
||||
@@ -28,5 +28,5 @@ outputs:
|
||||
all-labels:
|
||||
description: 'A comma-separated list of all labels that the PR contains'
|
||||
runs:
|
||||
using: 'node16'
|
||||
using: 'node24'
|
||||
main: 'dist/index.js'
|
||||
|
||||
Vendored
+41113
-14173
File diff suppressed because one or more lines are too long
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// 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.
|
||||
import js from '@eslint/js';
|
||||
import tsParser from '@typescript-eslint/parser';
|
||||
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
||||
import jest from 'eslint-plugin-jest';
|
||||
import n from 'eslint-plugin-n';
|
||||
import prettier from 'eslint-config-prettier';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['**/*', '!src/**', '!__tests__/**']
|
||||
},
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.es2015
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tsPlugin,
|
||||
n
|
||||
},
|
||||
rules: {
|
||||
...tsPlugin.configs.recommended.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}],
|
||||
'no-undef': 'off',
|
||||
'no-useless-assignment': 'off',
|
||||
'n/no-extraneous-import': 'error'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*{test,spec}.ts'],
|
||||
plugins: {jest},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.jest
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
...jest.configs['flat/recommended'].rules,
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'jest/no-standalone-expect': 'off',
|
||||
'jest/no-conditional-expect': 'off',
|
||||
'no-console': 'off'
|
||||
}
|
||||
},
|
||||
prettier
|
||||
];
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/*.test.ts'],
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest'
|
||||
},
|
||||
verbose: true
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
export default {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/*.test.ts'],
|
||||
transform: {
|
||||
'^.+\\.ts$': [
|
||||
'ts-jest',
|
||||
{
|
||||
useESM: true,
|
||||
diagnostics: {
|
||||
ignoreCodes: [151002]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
transformIgnorePatterns: ['node_modules/(?!(@actions|@octokit)/)'],
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||
},
|
||||
verbose: true
|
||||
}
|
||||
Generated
+3538
-7866
File diff suppressed because it is too large
Load Diff
+30
-27
@@ -1,15 +1,19 @@
|
||||
{
|
||||
"name": "labeler",
|
||||
"version": "4.1.0",
|
||||
"version": "7.0.0",
|
||||
"description": "Labels pull requests by files altered",
|
||||
"type": "module",
|
||||
"main": "lib/main.js",
|
||||
"engines": {
|
||||
"node": ">=24"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc && ncc build lib/main.js",
|
||||
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
|
||||
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
|
||||
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
|
||||
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
|
||||
"test": "jest"
|
||||
"format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
|
||||
"format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
|
||||
"lint": "eslint \"**/*.ts\"",
|
||||
"lint:fix": "eslint \"**/*.ts\" --fix",
|
||||
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -24,28 +28,27 @@
|
||||
"author": "GitHub",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/github": "^5.1.1",
|
||||
"@octokit/plugin-retry": "^5.0.5",
|
||||
"jest-each": "^29.6.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"minimatch": "^7.4.3"
|
||||
"@actions/core": "^3.0.1",
|
||||
"@actions/github": "^9.1.1",
|
||||
"@octokit/plugin-retry": "^8.1.0",
|
||||
"js-yaml": "^5.2.3",
|
||||
"minimatch": "^10.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/minimatch": "^5.1.2",
|
||||
"@types/node": "^16.11.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
||||
"@typescript-eslint/parser": "^5.61.0",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-jest": "^27.2.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"jest": "^27.5.1",
|
||||
"prettier": "^2.8.8",
|
||||
"ts-jest": "^27.1.3",
|
||||
"typescript": "^4.9.5"
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@jest/globals": "^30.4.1",
|
||||
"@types/node": "^24.13.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
||||
"@typescript-eslint/parser": "^8.62.0",
|
||||
"@vercel/ncc": "^0.44.0",
|
||||
"eslint": "^10.5.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-jest": "^29.15.2",
|
||||
"eslint-plugin-n": "^18.1.0",
|
||||
"globals": "^17.7.0",
|
||||
"jest": "^30.4.2",
|
||||
"prettier": "^3.8.4",
|
||||
"ts-jest": "^29.4.11",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
import * as github from '@actions/github';
|
||||
import {ClientType} from './types.js';
|
||||
|
||||
const isServerError = (error: unknown): error is {status: number} =>
|
||||
typeof error === 'object' &&
|
||||
error !== null &&
|
||||
'status' in error &&
|
||||
typeof error.status === 'number' &&
|
||||
error.status >= 500 &&
|
||||
error.status < 600;
|
||||
|
||||
export const addLabels = async (
|
||||
client: ClientType,
|
||||
prNumber: number,
|
||||
labels: string[]
|
||||
) => {
|
||||
const request = {
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
issue_number: prNumber
|
||||
};
|
||||
|
||||
try {
|
||||
await client.rest.issues.addLabels({
|
||||
...request,
|
||||
labels,
|
||||
request: {retries: 0}
|
||||
});
|
||||
} catch (error: unknown) {
|
||||
if (!isServerError(error)) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
const currentLabelNames = new Set<string>();
|
||||
let page = 1;
|
||||
try {
|
||||
while (true) {
|
||||
const currentLabels = await client.rest.issues.listLabelsOnIssue({
|
||||
...request,
|
||||
per_page: 100,
|
||||
page,
|
||||
request: {retries: 0}
|
||||
});
|
||||
|
||||
for (const label of currentLabels.data) {
|
||||
currentLabelNames.add(label.name.toLowerCase());
|
||||
}
|
||||
|
||||
if (labels.every(label => currentLabelNames.has(label.toLowerCase()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentLabels.headers.link?.match(/;\s*rel="next"/)) {
|
||||
break;
|
||||
}
|
||||
|
||||
page++;
|
||||
}
|
||||
} catch {
|
||||
throw error;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import {ClientType} from './types.js';
|
||||
|
||||
export const getChangedFiles = async (
|
||||
client: ClientType,
|
||||
prNumber: number
|
||||
): Promise<string[]> => {
|
||||
const listFilesOptions = client.rest.pulls.listFiles.endpoint.merge({
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
pull_number: prNumber
|
||||
});
|
||||
|
||||
const listFilesResponse = await client.paginate(listFilesOptions);
|
||||
const changedFiles = listFilesResponse.map((f: any) => f.filename);
|
||||
|
||||
core.debug('found changed files:');
|
||||
for (const file of changedFiles) {
|
||||
core.debug(' ' + file);
|
||||
}
|
||||
|
||||
return changedFiles;
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import {getChangedFiles} from './get-changed-files.js';
|
||||
import {ClientType} from './types.js';
|
||||
|
||||
export async function* getPullRequests(
|
||||
client: ClientType,
|
||||
prNumbers: number[]
|
||||
) {
|
||||
for (const prNumber of prNumbers) {
|
||||
core.debug(`looking for pr #${prNumber}`);
|
||||
let prData: any;
|
||||
try {
|
||||
const result = await client.rest.pulls.get({
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
pull_number: prNumber
|
||||
});
|
||||
prData = result.data;
|
||||
} catch {
|
||||
core.warning(`Could not find pull request #${prNumber}, skipping`);
|
||||
continue;
|
||||
}
|
||||
|
||||
core.debug(`fetching changed files for pr #${prNumber}`);
|
||||
const changedFiles: string[] = await getChangedFiles(client, prNumber);
|
||||
if (!changedFiles.length) {
|
||||
core.warning(`Pull request #${prNumber} has no changed files, skipping`);
|
||||
continue;
|
||||
}
|
||||
|
||||
yield {
|
||||
data: prData,
|
||||
number: prNumber,
|
||||
changedFiles
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import * as github from '@actions/github';
|
||||
import {ClientType} from './types.js';
|
||||
|
||||
export const getContent = async (
|
||||
client: ClientType,
|
||||
repoPath: string
|
||||
): Promise<string> => {
|
||||
const response: any = await client.rest.repos.getContent({
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
path: repoPath,
|
||||
ref: github.context.sha
|
||||
});
|
||||
|
||||
return Buffer.from(response.data.content, response.data.encoding).toString();
|
||||
};
|
||||
@@ -0,0 +1,231 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as yaml from 'js-yaml';
|
||||
import fs from 'fs';
|
||||
import {ClientType} from './types.js';
|
||||
import {getContent} from './get-content.js';
|
||||
|
||||
import {
|
||||
ChangedFilesMatchConfig,
|
||||
toChangedFilesMatchConfig
|
||||
} from '../changedFiles.js';
|
||||
|
||||
import {toBranchMatchConfig, BranchMatchConfig} from '../branch.js';
|
||||
|
||||
export interface MatchConfig {
|
||||
all?: BaseMatchConfig[];
|
||||
any?: BaseMatchConfig[];
|
||||
}
|
||||
|
||||
export type BaseMatchConfig = BranchMatchConfig & ChangedFilesMatchConfig;
|
||||
|
||||
export interface LabelConfigResult {
|
||||
labelConfigs: Map<string, MatchConfig[]>;
|
||||
changedFilesLimit?: number;
|
||||
maxFilesChanged?: number;
|
||||
}
|
||||
|
||||
const ALLOWED_CONFIG_KEYS = ['changed-files', 'head-branch', 'base-branch'];
|
||||
const TOP_LEVEL_OPTIONS = ['changed-files-labels-limit', 'max-files-changed'];
|
||||
|
||||
/**
|
||||
* Parses and validates a non-negative integer value from the configuration.
|
||||
*/
|
||||
function parseNonNegativeInteger(value: unknown, optionName: string): number {
|
||||
if (typeof value === 'number') {
|
||||
if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
|
||||
throw new Error(
|
||||
`Invalid value for '${optionName}': must be a non-negative integer (got ${value})`
|
||||
);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
if (typeof value === 'string') {
|
||||
const trimmed = value.trim();
|
||||
if (!/^\d+$/.test(trimmed)) {
|
||||
throw new Error(
|
||||
`Invalid value for '${optionName}': must be a non-negative integer (got '${value}')`
|
||||
);
|
||||
}
|
||||
return Number(trimmed);
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
throw new Error(
|
||||
`'${optionName}' is a reserved top-level option and cannot be used as a label name. Please rename it.`
|
||||
);
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
`Invalid value for '${optionName}': expected a non-negative integer`
|
||||
);
|
||||
}
|
||||
|
||||
export const getLabelConfigs = (
|
||||
client: ClientType,
|
||||
configurationPath: string
|
||||
): Promise<LabelConfigResult> =>
|
||||
Promise.resolve()
|
||||
.then(() => {
|
||||
if (!fs.existsSync(configurationPath)) {
|
||||
core.info(
|
||||
`The configuration file (path: ${configurationPath}) was not found locally, fetching via the api`
|
||||
);
|
||||
|
||||
return getContent(client, configurationPath);
|
||||
}
|
||||
|
||||
core.info(
|
||||
`The configuration file (path: ${configurationPath}) was found locally, reading from the file`
|
||||
);
|
||||
|
||||
return fs.readFileSync(configurationPath, {
|
||||
encoding: 'utf8'
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.name == 'HttpError' || error.name == 'NotFound') {
|
||||
core.warning(
|
||||
`The config file was not found at ${configurationPath}. Make sure it exists and that this action has the correct access rights.`
|
||||
);
|
||||
}
|
||||
return Promise.reject(error);
|
||||
})
|
||||
.then(configuration => {
|
||||
// loads (hopefully) a `{[label:string]: MatchConfig[]}`, but is `any`:
|
||||
const configObject: any = yaml.load(configuration);
|
||||
|
||||
// transform `any` => `LabelConfigResult` or throw if yaml is malformed:
|
||||
return getLabelConfigResultFromObject(configObject);
|
||||
});
|
||||
|
||||
export function getLabelConfigResultFromObject(
|
||||
configObject: any
|
||||
): LabelConfigResult {
|
||||
// Extract top-level options
|
||||
let changedFilesLimit: number | undefined;
|
||||
let maxFilesChanged: number | undefined;
|
||||
|
||||
const limitValue = configObject?.['changed-files-labels-limit'];
|
||||
if (limitValue !== undefined) {
|
||||
changedFilesLimit = parseNonNegativeInteger(
|
||||
limitValue,
|
||||
'changed-files-labels-limit'
|
||||
);
|
||||
}
|
||||
|
||||
const maxFilesValue = configObject?.['max-files-changed'];
|
||||
if (maxFilesValue !== undefined) {
|
||||
maxFilesChanged = parseNonNegativeInteger(
|
||||
maxFilesValue,
|
||||
'max-files-changed'
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
labelConfigs: getLabelConfigMapFromObject(configObject),
|
||||
changedFilesLimit,
|
||||
maxFilesChanged
|
||||
};
|
||||
}
|
||||
|
||||
export function getLabelConfigMapFromObject(
|
||||
configObject: any
|
||||
): Map<string, MatchConfig[]> {
|
||||
const labelMap: Map<string, MatchConfig[]> = new Map();
|
||||
for (const label in configObject) {
|
||||
// Skip top-level options
|
||||
if (TOP_LEVEL_OPTIONS.includes(label)) {
|
||||
continue;
|
||||
}
|
||||
const configOptions = configObject[label];
|
||||
if (
|
||||
!Array.isArray(configOptions) ||
|
||||
!configOptions.every(opts => typeof opts === 'object')
|
||||
) {
|
||||
throw Error(
|
||||
`found unexpected type for label '${label}' (should be array of config options)`
|
||||
);
|
||||
}
|
||||
const matchConfigs = configOptions.reduce<MatchConfig[]>(
|
||||
(updatedConfig, configValue) => {
|
||||
if (!configValue) {
|
||||
return updatedConfig;
|
||||
}
|
||||
|
||||
Object.entries(configValue).forEach(([key, value]) => {
|
||||
// If the top level `any` or `all` keys are provided then set them, and convert their values to
|
||||
// our config objects.
|
||||
if (key === 'any' || key === 'all') {
|
||||
if (Array.isArray(value)) {
|
||||
const newConfigs = value.map(toMatchConfig);
|
||||
updatedConfig.push({[key]: newConfigs});
|
||||
}
|
||||
} else if (ALLOWED_CONFIG_KEYS.includes(key)) {
|
||||
const newMatchConfig = toMatchConfig({[key]: value});
|
||||
// Find or set the `any` key so that we can add these properties to that rule,
|
||||
// Or create a new `any` key and add that to our array of configs.
|
||||
const indexOfAny = updatedConfig.findIndex(mc => !!mc['any']);
|
||||
if (indexOfAny >= 0) {
|
||||
updatedConfig[indexOfAny].any?.push(newMatchConfig);
|
||||
} else {
|
||||
updatedConfig.push({any: [newMatchConfig]});
|
||||
}
|
||||
} else {
|
||||
// Log the key that we don't know what to do with.
|
||||
core.info(`An unknown config option was under ${label}: ${key}`);
|
||||
}
|
||||
});
|
||||
|
||||
return updatedConfig;
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
if (matchConfigs.length) {
|
||||
labelMap.set(label, matchConfigs);
|
||||
}
|
||||
}
|
||||
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
export function toMatchConfig(config: any): BaseMatchConfig {
|
||||
const changedFilesConfig = toChangedFilesMatchConfig(config);
|
||||
const branchConfig = toBranchMatchConfig(config);
|
||||
|
||||
return {
|
||||
...changedFilesConfig,
|
||||
...branchConfig
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if any of the match configs for a label use changed-files patterns.
|
||||
* This is used to determine if a label should be counted toward the changed-files limit.
|
||||
*/
|
||||
export function configUsesChangedFiles(matchConfigs: MatchConfig[]): boolean {
|
||||
for (const config of matchConfigs) {
|
||||
if (config.all) {
|
||||
for (const baseConfig of config.all) {
|
||||
if (
|
||||
baseConfig.changedFiles &&
|
||||
baseConfig.changedFiles.some(cf => Object.keys(cf).length > 0)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (config.any) {
|
||||
for (const baseConfig of config.any) {
|
||||
if (
|
||||
baseConfig.changedFiles &&
|
||||
baseConfig.changedFiles.some(cf => Object.keys(cf).length > 0)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user