Merge branch 'master' into useLongPollingLogs

This commit is contained in:
bnechyporenko
2022-10-10 08:58:16 +02:00
509 changed files with 8079 additions and 807 deletions
+22
View File
@@ -1,5 +1,27 @@
# @backstage/plugin-scaffolder
## 1.7.0-next.1
### Patch Changes
- e4f0a96424: Making the description of the GitLab repoUrl owner field more clearer by focusing it refers to the GitLab namespace.
- 8220f2fd83: Support custom layouts in dry run editor
- Updated dependencies
- @backstage/plugin-catalog-react@1.2.0-next.1
- @backstage/catalog-client@1.1.1-next.1
- @backstage/core-components@0.11.2-next.1
- @backstage/core-plugin-api@1.0.7-next.1
- @backstage/catalog-model@1.1.2-next.1
- @backstage/config@1.0.3-next.1
- @backstage/errors@1.1.2-next.1
- @backstage/integration@1.3.2-next.1
- @backstage/integration-react@1.1.5-next.1
- @backstage/theme@0.2.16
- @backstage/types@1.0.0
- @backstage/plugin-catalog-common@1.0.7-next.1
- @backstage/plugin-permission-react@0.4.6-next.1
- @backstage/plugin-scaffolder-common@1.2.1-next.1
## 1.7.0-next.0
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-scaffolder",
"description": "The Backstage plugin that helps you create new things",
"version": "1.7.0-next.0",
"version": "1.7.0-next.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -88,34 +88,36 @@ export const RepoUrlPicker = (
[uiSchema],
);
const { owner, organization, repoName } = state;
useEffect(() => {
onChange(serializeRepoPickerUrl(state));
}, [state, onChange]);
/* we deal with calling the repo setting here instead of in each components for ease */
useEffect(() => {
if (allowedOrganizations.length > 0) {
if (allowedOrganizations.length > 0 && !organization) {
setState(prevState => ({
...prevState,
organization: allowedOrganizations[0],
}));
}
}, [setState, allowedOrganizations]);
}, [setState, allowedOrganizations, organization]);
useEffect(() => {
if (allowedOwners.length > 0) {
if (allowedOwners.length > 0 && !owner) {
setState(prevState => ({
...prevState,
owner: allowedOwners[0],
}));
}
}, [setState, allowedOwners]);
}, [setState, allowedOwners, owner]);
useEffect(() => {
if (allowedRepos.length > 0) {
if (allowedRepos.length > 0 && !repoName) {
setState(prevState => ({ ...prevState, repoName: allowedRepos[0] }));
}
}, [setState, allowedRepos]);
}, [setState, allowedRepos, repoName]);
const updateLocalState = useCallback(
(newState: RepoUrlPickerState) => {
@@ -135,7 +137,7 @@ export const RepoUrlPicker = (
return;
}
const [host, owner, repoName] = [
const [encodedHost, encodedOwner, encodedRepoName] = [
state.host,
state.owner,
state.repoName,
@@ -145,7 +147,7 @@ export const RepoUrlPicker = (
// so lets grab them using the scmAuthApi and pass through
// any additional scopes from the ui:options
const { token } = await scmAuthApi.getCredentials({
url: `https://${host}/${owner}/${repoName}`,
url: `https://${encodedHost}/${encodedOwner}/${encodedRepoName}`,
additionalScope: {
repoWrite: true,
customScopes: requestUserCredentials.additionalScopes,
@@ -174,9 +176,9 @@ export const RepoUrlPicker = (
{hostType === 'github' && (
<GithubRepoPicker
allowedOwners={allowedOwners}
onChange={updateLocalState}
rawErrors={rawErrors}
state={state}
onChange={updateLocalState}
/>
)}
{hostType === 'gitlab' && (
@@ -214,8 +216,8 @@ export const RepoUrlPicker = (
<RepoUrlPickerRepoName
repoName={state.repoName}
allowedRepos={allowedRepos}
onChange={repoName =>
setState(prevState => ({ ...prevState, repoName }))
onChange={repo =>
setState(prevState => ({ ...prevState, repoName: repo }))
}
rawErrors={rawErrors}
/>