Skip to content

Commit 2c2b817

Browse files
committed
Revert "fix(x2a): bitbucket RepoUrlPicker wrapper (#2768)"
This reverts commit d8c241a.
1 parent 8af18b1 commit 2c2b817

File tree

10 files changed

+5
-314
lines changed

10 files changed

+5
-314
lines changed

workspaces/x2a/packages/app/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import {
5757
X2APage,
5858
x2aPluginTranslations,
5959
RepoAuthenticationExtension,
60-
X2ARepoUrlPickerExtension,
6160
} from '@red-hat-developer-hub/backstage-plugin-x2a';
6261
import { DcrConsentPage } from '@red-hat-developer-hub/backstage-plugin-x2a-dcr';
6362
import {
@@ -163,7 +162,6 @@ const routes = (
163162
<Route path="/create" element={<ScaffolderPage />}>
164163
<ScaffolderFieldExtensions>
165164
<RepoAuthenticationExtension />
166-
<X2ARepoUrlPickerExtension />
167165
</ScaffolderFieldExtensions>
168166
</Route>
169167
</FlatRoutes>

workspaces/x2a/plugins/scaffolder-backend-module-x2a/templates/conversion-project-template.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,7 @@ spec:
123123
description: |
124124
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.
125125
type: string
126-
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
127-
# fix a Bitbucket Cloud/Server type mismatch in Backstage
128-
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
129-
# See https://redhat.atlassian.net/browse/FLPATH-4033
130-
ui:field: X2ARepoUrlPicker
126+
ui:field: RepoUrlPicker
131127
ui:options:
132128
requestUserCredentials:
133129
secretsKey: SRC_USER_OAUTH_TOKEN
@@ -181,11 +177,7 @@ spec:
181177
description: |
182178
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.
183179
type: string
184-
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
185-
# fix a Bitbucket Cloud/Server type mismatch in Backstage
186-
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
187-
# See https://redhat.atlassian.net/browse/FLPATH-4033
188-
ui:field: X2ARepoUrlPicker
180+
ui:field: RepoUrlPicker
189181
ui:options:
190182
requestUserCredentials:
191183
secretsKey: TGT_USER_OAUTH_TOKEN

workspaces/x2a/plugins/x2a/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@
3737
},
3838
"dependencies": {
3939
"@backstage/catalog-model": "^1.7.6",
40-
"@backstage/core-app-api": "^1.19.2",
4140
"@backstage/core-components": "^0.18.3",
4241
"@backstage/core-plugin-api": "^1.12.0",
43-
"@backstage/integration-react": "^1.2.12",
4442
"@backstage/plugin-catalog": "^1.32.0",
4543
"@backstage/plugin-permission-react": "^0.4.38",
46-
"@backstage/plugin-scaffolder": "^1.34.3",
4744
"@backstage/plugin-scaffolder-react": "^1.19.3",
4845
"@backstage/theme": "^0.7.0",
4946
"@backstage/ui": "^0.9.1",
@@ -64,6 +61,7 @@
6461
"devDependencies": {
6562
"@backstage/cli": "^0.34.5",
6663
"@backstage/config": "^1.3.6",
64+
"@backstage/core-app-api": "^1.19.2",
6765
"@backstage/dev-utils": "^1.1.17",
6866
"@backstage/frontend-plugin-api": "^0.14.1",
6967
"@backstage/test-utils": "^1.7.13",

workspaces/x2a/plugins/x2a/report.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ readonly empty: string;
227227
// @public
228228
export const x2aPluginTranslations: TranslationResource<"plugin.x2a">;
229229

230-
// @public
231-
export const X2ARepoUrlPickerExtension: FieldExtensionComponent<string, {}>;
232-
233230
// (No @packageDocumentation comment for this package)
234231

235232
```

workspaces/x2a/plugins/x2a/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
export {
17-
x2APlugin,
18-
X2APage,
19-
RepoAuthenticationExtension,
20-
X2ARepoUrlPickerExtension,
21-
} from './plugin';
16+
export { x2APlugin, X2APage, RepoAuthenticationExtension } from './plugin';
2217
export { x2aPluginTranslations, x2aPluginTranslationRef } from './translations';
2318
export {
2419
useTranslation as useX2ATranslation,

workspaces/x2a/plugins/x2a/src/plugin.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ import {
2020
import { createScaffolderFieldExtension } from '@backstage/plugin-scaffolder-react';
2121

2222
import { rootRouteRef } from './routes';
23-
import {
24-
RepoAuthentication,
25-
repoAuthenticationValidation,
26-
RepoUrlPickerWithBitbucketFix,
27-
} from './scaffolder';
28-
import { repoPickerValidation } from '@backstage/plugin-scaffolder';
23+
import { RepoAuthentication, repoAuthenticationValidation } from './scaffolder';
2924

3025
/** @public */
3126
export const x2APlugin = createPlugin({
@@ -52,18 +47,3 @@ export const RepoAuthenticationExtension = x2APlugin.provide(
5247
validation: repoAuthenticationValidation,
5348
}),
5449
);
55-
56-
/**
57-
* Scaffolder field extension that wraps the built-in RepoUrlPicker with a fix
58-
* for Bitbucket Cloud/Server type resolution. Use `ui:field: X2ARepoUrlPicker`
59-
* in templates instead of `RepoUrlPicker` when bitbucket.org is an allowed host.
60-
*
61-
* @public
62-
*/
63-
export const X2ARepoUrlPickerExtension = x2APlugin.provide(
64-
createScaffolderFieldExtension({
65-
component: RepoUrlPickerWithBitbucketFix,
66-
name: 'X2ARepoUrlPicker',
67-
validation: repoPickerValidation,
68-
}),
69-
);

workspaces/x2a/plugins/x2a/src/scaffolder/RepoUrlPickerWithBitbucketFix.test.ts

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

workspaces/x2a/plugins/x2a/src/scaffolder/RepoUrlPickerWithBitbucketFix.tsx

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

workspaces/x2a/plugins/x2a/src/scaffolder/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
* See the License for the specific language governing permissions and limitations under the License.
1414
*/
1515
export * from './RepoAuthentication';
16-
export { RepoUrlPickerWithBitbucketFix } from './RepoUrlPickerWithBitbucketFix';

0 commit comments

Comments
 (0)