Skip to content

Commit 99aacd6

Browse files
committed
Merge branch 'release'
2 parents f94ce5c + b178226 commit 99aacd6

File tree

20 files changed

+147
-67
lines changed

20 files changed

+147
-67
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
@b41ex
1+
#####################################################
2+
#
3+
# List of approvers for this repository
4+
#
5+
#####################################################
6+
7+
#
8+
# Learn about CODEOWNERS file format:
9+
# https://help.github.com/en/articles/about-code-owners
10+
#
11+
12+
* @b41ex

.github/pr-assigner-config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/cla.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ permissions:
1111

1212
jobs:
1313
CLAAssistant:
14-
if: github.event.pull_request.draft == false
1514
permissions:
1615
actions: write
1716
contents: write
@@ -21,7 +20,7 @@ jobs:
2120
steps:
2221
- name: "CLA Assistant"
2322
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
24-
uses: contributor-assistant/[email protected]
23+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 #v2.6.1
2524
env:
2625
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2726
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACCESS_TOKEN }}

.github/workflows/pr-assigner.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/pr-assigner.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Auto-Assignment
2+
run-name: "Assigning reviewers for PR #${{ github.event.pull_request.number }}"
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
pr-auto-assign:
14+
name: "Auto-assign Reviewers to PR #${{ github.event.pull_request.number }}"
15+
runs-on: ubuntu-latest
16+
permissions:
17+
pull-requests: write
18+
contents: read
19+
steps:
20+
- name: "Check if PR is from a fork"
21+
run: |
22+
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.pull_request.base.repo.full_name }}" ]; then
23+
echo "⚠️ Pull request is from a fork — skipping assignee assignment (no write permissions)."
24+
exit 0
25+
fi
26+
27+
- name: "Checkout Repository"
28+
uses: actions/checkout@v5
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Assign Reviewers"
33+
uses: netcracker/qubership-workflow-hub/actions/pr-assigner@b575bad3a0959c4e883bc34f9d055ff07fde2dbd #2.0.1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netcracker/qubership-apihub-api-processor",
3-
"version": "4.2.2",
3+
"version": "4.2.3",
44
"description": "",
55
"license": "Apache-2.0",
66
"module": "dist/esm/src/index.js",
@@ -31,8 +31,8 @@
3131
"update-lock-file": "update-lock-file @netcracker"
3232
},
3333
"dependencies": {
34-
"@netcracker/qubership-apihub-api-diff": "2.5.0",
35-
"@netcracker/qubership-apihub-api-unifier": "2.4.2",
34+
"@netcracker/qubership-apihub-api-diff": "2.5.1",
35+
"@netcracker/qubership-apihub-api-unifier": "2.4.3",
3636
"@netcracker/qubership-apihub-graphapi": "1.0.8",
3737
"@netcracker/qubership-apihub-json-crawl": "1.1.0",
3838
"adm-zip": "0.5.10",

src/apitypes/graphql/graphql.parser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
*/
1616

1717
import { buildSchema } from 'graphql/utilities'
18-
import YAML from 'js-yaml'
19-
2018
import { FILE_KIND, TextFile } from '../../types'
2119
import { getFileExtension } from '../../utils'
2220
import { GRAPHQL_DOCUMENT_TYPE, GRAPHQL_FILE_FORMAT } from './graphql.consts'
21+
import { loadYaml } from '@netcracker/qubership-apihub-api-unifier'
2322

2423
export const parseGraphQLFile = async (fileId: string, source: Blob): Promise<TextFile | undefined> => {
2524
const sourceString = await source.text()
@@ -52,7 +51,7 @@ export const parseGraphQLFile = async (fileId: string, source: Blob): Promise<Te
5251
fileId,
5352
type: GRAPHQL_DOCUMENT_TYPE.GRAPHAPI,
5453
format: GRAPHQL_FILE_FORMAT.YAML,
55-
data: YAML.load(sourceString) as object,
54+
data: loadYaml(sourceString) as object,
5655
source,
5756
kind: FILE_KIND.TEXT,
5857
}
@@ -62,7 +61,7 @@ export const parseGraphQLFile = async (fileId: string, source: Blob): Promise<Te
6261
fileId,
6362
type: GRAPHQL_DOCUMENT_TYPE.INTROSPECTION,
6463
format: GRAPHQL_FILE_FORMAT.YAML,
65-
data: YAML.load(sourceString) as object,
64+
data: loadYaml(sourceString) as object,
6665
source,
6766
kind: FILE_KIND.TEXT,
6867
}

src/apitypes/rest/rest.parser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
*/
1616

1717
import { OpenAPIV2, OpenAPIV3 } from 'openapi-types'
18-
import YAML from 'js-yaml'
19-
2018
import oas3 from './schemas/oas3.json'
2119
import oas31 from './schemas/oas31.json'
2220
import swagger from './schemas/swagger.json'
2321

2422
import { REST_DOCUMENT_TYPE, REST_FILE_FORMAT } from './rest.consts'
2523
import { getFileExtension, validateDocument } from '../../utils'
2624
import { FILE_KIND, TextFile } from '../../types'
25+
import { loadYaml } from '@netcracker/qubership-apihub-api-unifier'
2726

2827
//TODO: add unit tests for parseRestFile
2928

@@ -58,7 +57,7 @@ export const parseRestFile = async (fileId: string, source: Blob): Promise<TextF
5857
}
5958
} else if (([REST_FILE_FORMAT.YAML, REST_FILE_FORMAT.YML] as string[]).includes(extension) || !extension) {
6059
if (/\s*?'?"?openapi'?"?\s*?:\s*?\|?\s*'?"?3\.[01]\..+?'?"?/g.test(sourceString)) {
61-
const data = YAML.load(sourceString) as OpenAPIV3.Document
60+
const data = loadYaml(sourceString) as OpenAPIV3.Document
6261

6362
const type = data.openapi.startsWith('3.0') ? REST_DOCUMENT_TYPE.OAS3 : REST_DOCUMENT_TYPE.OAS31
6463

@@ -68,7 +67,7 @@ export const parseRestFile = async (fileId: string, source: Blob): Promise<TextF
6867
return { fileId, type, format: REST_FILE_FORMAT.YAML, data, source, errors, kind: FILE_KIND.TEXT }
6968
}
7069
if (/\s*?'?"?swagger'?"?\s*?:\s*?\|?\s*'?"?2\..+?'?"?/g.test(sourceString)) {
71-
const data = YAML.load(sourceString) as OpenAPIV2.Document
70+
const data = loadYaml(sourceString) as OpenAPIV2.Document
7271

7372
// validate swagger file
7473
const errors = validateDocument(swagger, data)

src/apitypes/unknown/unknown.parser.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import YAML from 'js-yaml'
18-
1917
import { DOCUMENT_TYPE, FILE_FORMAT, SUPPORTED_FILE_FORMATS } from '../../consts'
2018
import { BinaryFile, FILE_KIND, FileFormat, TextFile } from '../../types/internal'
2119
import { getFileExtension } from '../../utils'
20+
import { loadYaml } from '@netcracker/qubership-apihub-api-unifier'
2221

2322
export const parseUnknownFile = async (fileId: string, source: Blob): Promise<TextFile | undefined> => {
2423
const sourceString = await source.text()
@@ -38,7 +37,7 @@ export const parseUnknownFile = async (fileId: string, source: Blob): Promise<Te
3837
fileId,
3938
type: DOCUMENT_TYPE.UNKNOWN,
4039
format: FILE_FORMAT.YAML,
41-
data: YAML.load(sourceString),
40+
data: loadYaml(sourceString),
4241
source,
4342
kind: FILE_KIND.TEXT,
4443
}

0 commit comments

Comments
 (0)