Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion workspaces/x2a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"@backstage/backend-plugin-api": "1.5.0",
"@backstage/backend-defaults": "0.13.2",
"@backstage/plugin-auth-node": "0.6.10",
"@backstage/plugin-permission-backend": "0.7.3"
"@backstage/plugin-permission-backend": "0.7.3",
"@backstage/core-app-api": "1.19.2"
},
"prettier": "@backstage/cli/config/prettier",
"lint-staged": {
Expand Down
8 changes: 4 additions & 4 deletions workspaces/x2a/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@backstage/cli": "^0.34.5",
"@backstage/core-app-api": "^1.19.2",
"@backstage/core-components": "^0.18.3",
"@backstage/core-plugin-api": "^1.12.0",
"@backstage/integration-react": "^1.2.12",
"@backstage/core-plugin-api": "1.12.0",
"@backstage/integration-react": "1.2.12",
"@backstage/plugin-api-docs": "^0.13.1",
"@backstage/plugin-catalog": "^1.32.0",
"@backstage/plugin-catalog-common": "^1.1.7",
Expand All @@ -37,8 +37,8 @@
"@backstage/plugin-notifications": "^0.5.8",
"@backstage/plugin-org": "^0.6.46",
"@backstage/plugin-permission-react": "^0.4.38",
"@backstage/plugin-scaffolder": "^1.34.3",
"@backstage/plugin-scaffolder-react": "^1.19.3",
"@backstage/plugin-scaffolder": "1.34.3",
"@backstage/plugin-scaffolder-react": "1.19.3",
"@backstage/plugin-search": "^1.5.0",
"@backstage/plugin-search-react": "^1.10.0",
"@backstage/plugin-signals": "^0.0.22",
Expand Down
2 changes: 0 additions & 2 deletions workspaces/x2a/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import {
X2APage,
x2aPluginTranslations,
RepoAuthenticationExtension,
X2ARepoUrlPickerExtension,
} from '@red-hat-developer-hub/backstage-plugin-x2a';
import { DcrConsentPage } from '@red-hat-developer-hub/backstage-plugin-x2a-dcr';
import {
Expand Down Expand Up @@ -163,7 +162,6 @@ const routes = (
<Route path="/create" element={<ScaffolderPage />}>
<ScaffolderFieldExtensions>
<RepoAuthenticationExtension />
<X2ARepoUrlPickerExtension />
</ScaffolderFieldExtensions>
</Route>
</FlatRoutes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ spec:
description: |
The Owner should be your SCM (Source Code Management) username. The repository name should be a name that already exists in your SCM account and contains a Chef cookbook or directory to convert.
type: string
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
# fix a Bitbucket Cloud/Server type mismatch in Backstage
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
# See https://redhat.atlassian.net/browse/FLPATH-4033
ui:field: X2ARepoUrlPicker
ui:field: RepoUrlPicker
ui:options:
requestUserCredentials:
secretsKey: SRC_USER_OAUTH_TOKEN
Expand Down Expand Up @@ -181,11 +177,7 @@ spec:
description: |
The Owner should be your SCM (Source Code Management) username. The repository name should be a name that already exists in your SCM account. It will be populated by converted Ansible sources and intermediary artifacts.
type: string
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
# fix a Bitbucket Cloud/Server type mismatch in Backstage
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
# See https://redhat.atlassian.net/browse/FLPATH-4033
ui:field: X2ARepoUrlPicker
ui:field: RepoUrlPicker
ui:options:
requestUserCredentials:
secretsKey: TGT_USER_OAUTH_TOKEN
Expand Down
11 changes: 6 additions & 5 deletions workspaces/x2a/plugins/x2a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
},
"dependencies": {
"@backstage/catalog-model": "^1.7.6",
"@backstage/core-app-api": "^1.19.2",
"@backstage/core-components": "^0.18.3",
"@backstage/core-plugin-api": "^1.12.0",
"@backstage/integration-react": "^1.2.12",
"@backstage/core-plugin-api": "1.12.0",
"@backstage/integration-react": "1.2.12",
"@backstage/plugin-catalog": "^1.32.0",
"@backstage/plugin-permission-backend": "0.7.3",
"@backstage/plugin-permission-react": "^0.4.38",
"@backstage/plugin-scaffolder": "^1.34.3",
"@backstage/plugin-scaffolder-react": "^1.19.3",
"@backstage/plugin-scaffolder": "1.34.3",
"@backstage/plugin-scaffolder-react": "1.19.3",
"@backstage/theme": "^0.7.0",
"@backstage/ui": "^0.9.1",
"@material-ui/core": "^4.12.2",
Expand All @@ -64,6 +64,7 @@
"devDependencies": {
"@backstage/cli": "^0.34.5",
"@backstage/config": "^1.3.6",
"@backstage/core-app-api": "^1.19.2",
"@backstage/dev-utils": "^1.1.17",
"@backstage/frontend-plugin-api": "^0.14.1",
"@backstage/test-utils": "^1.7.13",
Expand Down
3 changes: 0 additions & 3 deletions workspaces/x2a/plugins/x2a/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@ readonly empty: string;
// @public
export const x2aPluginTranslations: TranslationResource<"plugin.x2a">;

// @public
export const X2ARepoUrlPickerExtension: FieldExtensionComponent<string, {}>;

// (No @packageDocumentation comment for this package)

```
7 changes: 1 addition & 6 deletions workspaces/x2a/plugins/x2a/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {
x2APlugin,
X2APage,
RepoAuthenticationExtension,
X2ARepoUrlPickerExtension,
} from './plugin';
export { x2APlugin, X2APage, RepoAuthenticationExtension } from './plugin';
export { x2aPluginTranslations, x2aPluginTranslationRef } from './translations';
export {
useTranslation as useX2ATranslation,
Expand Down
22 changes: 1 addition & 21 deletions workspaces/x2a/plugins/x2a/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ import {
import { createScaffolderFieldExtension } from '@backstage/plugin-scaffolder-react';

import { rootRouteRef } from './routes';
import {
RepoAuthentication,
repoAuthenticationValidation,
RepoUrlPickerWithBitbucketFix,
} from './scaffolder';
import { repoPickerValidation } from '@backstage/plugin-scaffolder';
import { RepoAuthentication, repoAuthenticationValidation } from './scaffolder';

/** @public */
export const x2APlugin = createPlugin({
Expand All @@ -52,18 +47,3 @@ export const RepoAuthenticationExtension = x2APlugin.provide(
validation: repoAuthenticationValidation,
}),
);

/**
* Scaffolder field extension that wraps the built-in RepoUrlPicker with a fix
* for Bitbucket Cloud/Server type resolution. Use `ui:field: X2ARepoUrlPicker`
* in templates instead of `RepoUrlPicker` when bitbucket.org is an allowed host.
*
* @public
*/
export const X2ARepoUrlPickerExtension = x2APlugin.provide(
createScaffolderFieldExtension({
component: RepoUrlPickerWithBitbucketFix,
name: 'X2ARepoUrlPicker',
validation: repoPickerValidation,
}),
);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const mockSetSecrets = jest.fn();
const mockAuthenticate = jest.fn();

jest.mock('@backstage/plugin-scaffolder-react', () => ({
...jest.requireActual('@backstage/plugin-scaffolder-react'),
useTemplateSecrets: () => ({
secrets: {},
setSecrets: mockSetSecrets,
Expand Down

This file was deleted.

Loading
Loading