Merge pull request #5146 from padraigobrien/gh-4276-handle-non-latin-characters

Enable non unicode character in catalog import.
This commit is contained in:
Johan Haals
2021-04-07 09:37:45 +02:00
committed by GitHub
5 changed files with 15 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
When importing components you will now have the ability to use non Unicode characters in the entity owner field
+1
View File
@@ -43,6 +43,7 @@
"@octokit/rest": "^18.0.12",
"@types/react": "^16.9",
"git-url-parse": "^11.4.4",
"js-base64": "^3.6.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hook-form": "^6.15.4",
@@ -309,7 +309,7 @@ describe('CatalogImportClient', () => {
await expect(
catalogImportClient.submitPullRequest({
repositoryUrl: 'https://github.com/backstage/backstage',
fileContent: 'some content',
fileContent: 'some content 🤖',
title: 'A title/message',
body: 'A body',
}),
@@ -335,7 +335,7 @@ describe('CatalogImportClient', () => {
repo: 'backstage',
path: 'catalog-info.yaml',
message: 'A title/message',
content: 'c29tZSBjb250ZW50',
content: 'c29tZSBjb250ZW50IPCfpJY=',
branch: 'backstage-integration',
});
expect(
@@ -21,6 +21,7 @@ import {
GitHubIntegrationConfig,
ScmIntegrationRegistry,
} from '@backstage/integration';
import { Base64 } from 'js-base64';
import { Octokit } from '@octokit/rest';
import { PartialEntity } from '../types';
import { AnalyzeResult, CatalogImportApi } from './CatalogImportApi';
@@ -300,7 +301,7 @@ export class CatalogImportClient implements CatalogImportApi {
repo,
path: fileName,
message: title,
content: btoa(fileContent),
content: Base64.encode(fileContent),
branch: branchName,
})
.catch(e => {
+5
View File
@@ -16861,6 +16861,11 @@ joycon@^2.2.5:
resolved "https://registry.npmjs.org/joycon/-/joycon-2.2.5.tgz#8d4cf4cbb2544d7b7583c216fcdfec19f6be1615"
integrity sha512-YqvUxoOcVPnCp0VU1/56f+iKSdvIRJYPznH22BdXV3xMk75SFXhWeJkZ8C9XxUWt1b5x2X1SxuFygW1U0FmkEQ==
js-base64@^3.6.0:
version "3.6.0"
resolved "https://registry.npmjs.org/js-base64/-/js-base64-3.6.0.tgz#773e1de628f4f298d65a7e9842c50244751f5756"
integrity sha512-wVdUBYQeY2gY73RIlPrysvpYx+2vheGo8Y1SNQv/BzHToWpAZzJU7Z6uheKMAe+GLSBig5/Ps2nxg/8tRB73xg==
js-cookie@^2.2.1:
version "2.2.1"
resolved "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"