Skip to content

Commit

Permalink
Update gitconfig from UD (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
akurinnoy authored Sep 21, 2023
1 parent 6d80df0 commit 6304930
Show file tree
Hide file tree
Showing 57 changed files with 3,092 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .deps/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
| [`[email protected]`](https://github.com/mafintosh/fs-constants.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/jprichardson/node-fs-extra) | MIT | clearlydefined |
| `[email protected]` | | transitive dependency |
| [`[email protected]`](git://github.com/es-shims/Function.prototype.name.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/es-shims/Function.prototype.name.git) | MIT | #10255 |
| [`[email protected]`](git+https://github.com/inspect-js/functions-have-names.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/npm/gauge.git) | ISC | clearlydefined |
| [`[email protected]`](https://github.com/loganfsmyth/gensync.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -799,7 +799,7 @@
| [`[email protected]`](https://github.com/SBoudrias/run-async.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/feross/run-parallel.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/reactivex/rxjs.git) | Apache-2.0 | #5993 |
| [`[email protected]`](git+https://github.com/ljharb/safe-array-concat.git) | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/ljharb/safe-array-concat.git) | MIT | #10335 |
| [`[email protected]`](git+https://github.com/ljharb/safe-regex-test.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/lddubeau/saxes.git) | ISC | clearlydefined |
| [`[email protected]`](https://github.com/webpack/schema-utils.git) | MIT | #8986 |
Expand Down Expand Up @@ -836,7 +836,7 @@
| [`[email protected]`](https://github.com/sindresorhus/string-width.git) | MIT | transitive dependency |
| [`[email protected]`](https://github.com/sindresorhus/string-width.git) | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/es-shims/String.prototype.matchAll.git) | MIT | #4571 |
| [`[email protected]`](git://github.com/es-shims/String.prototype.trim.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/es-shims/String.prototype.trim.git) | MIT | #10361 |
| [`[email protected]`](git://github.com/es-shims/String.prototype.trimEnd.git) | MIT | #4564 |
| [`[email protected]`](git://github.com/es-shims/String.prototype.trimStart.git) | MIT | #4647 |
| [`[email protected]`](https://github.com/chalk/strip-ansi.git) | MIT | transitive dependency |
Expand Down
9 changes: 5 additions & 4 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
| [`@babel/[email protected]`](https://github.com/babel/babel.git) | MIT | #8730 |
| [`@devfile/[email protected]`](https://github.com/devfile/api.git) | Apache-2.0 | clearlydefined |
| `@eclipse-che/[email protected]` | EPL-2.0 | ecd.che |
| [`@eclipse-che/che-devworkspace-generator@0.0.1-99986b8`](git+https://github.com/eclipse-che/che-devfile-registry.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/common@7.74.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-backend@7.74.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-frontend@7.74.0-next`](git://github.com/eclipse/che-dashboard.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/che-devworkspace-generator@7.75.0-next-50585f6`](git+https://github.com/eclipse-che/che-devfile-registry.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/common@7.75.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-backend@7.75.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-frontend@7.75.0-next`](git://github.com/eclipse/che-dashboard.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/[email protected]`](git+https://github.com/che-incubator/devfile-converter.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/[email protected]`](https://github.com/eclipse/che-workspace-client) | EPL-2.0 | ecd.che |
| [`@fastify/[email protected]`](git+https://github.com/fastify/accept-negotiator.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -256,6 +256,7 @@
| [`[email protected]`](https://github.com/Microsoft/monaco-languages) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/lukeed/mri.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/zeit/ms.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/evangelion1204/multi-ini.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/ai/nanoid.git) | MIT | #7571 |
| [`[email protected]`](https://github.com/bitinn/node-fetch.git) | MIT | #6954 |
| [`[email protected]`](https://github.com/mikeal/oauth-sign) | Apache-2.0 | clearlydefined |
Expand Down
13 changes: 13 additions & 0 deletions packages/common/src/dto/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ export interface IDockerConfig {
resourceVersion?: string;
}

export interface IGitConfig {
resourceVersion?: string;
gitconfig: {
user: {
name: string;
email: string;
};
[section: string]: {
[key: string]: string;
};
};
}

export interface IWorkspacesDefaultPlugins {
editor: string;
plugins: string[];
Expand Down
3 changes: 2 additions & 1 deletion packages/dashboard-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
"@fastify/swagger": "^8.8.0",
"@fastify/swagger-ui": "1.9.2",
"@fastify/websocket": "^8.2.0",
"@kubernetes/client-node": "^0.18.0",
"@kubernetes/client-node": "^0.18.1",
"args": "^5.0.3",
"axios": "^0.21.4",
"fastify": "^4.21.0",
"fs-extra": "^11.1.1",
"https": "^1.0.0",
"js-yaml": "^4.0.0",
"multi-ini": "^2.3.2",
"node-fetch": "^2.6.7",
"querystring": "^0.2.1",
"reflect-metadata": "^0.1.13",
Expand Down
3 changes: 3 additions & 0 deletions packages/dashboard-backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { registerWebsocket } from './routes/api/websocket';
import { registerYamlResolverRoute } from './routes/api/yamlResolver';
import { registerFactoryAcceptanceRedirect } from './routes/factoryAcceptanceRedirect';
import { registerWorkspaceRedirect } from './routes/workspaceRedirect';
import { registerGitConfigRoutes } from './routes/api/gitConfig';
import { registerGettingStartedSamplesRoutes } from './routes/api/gettingStartedSample';

export default async function buildApp(server: FastifyInstance): Promise<void> {
Expand Down Expand Up @@ -112,5 +113,7 @@ export default async function buildApp(server: FastifyInstance): Promise<void> {

registerPersonalAccessTokenRoutes(server);

registerGitConfigRoutes(server);

registerGettingStartedSamplesRoutes(isLocalRun(), server);
}
26 changes: 26 additions & 0 deletions packages/dashboard-backend/src/constants/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,32 @@ export const dockerConfigSchema: JSONSchema7 = {
required: ['dockerconfig'],
};

export const gitConfigSchema: JSONSchema7 = {
type: 'object',
properties: {
gitconfig: {
type: 'object',
properties: {
user: {
type: 'object',
properties: {
name: {
type: 'string',
},
email: {
type: 'string',
},
},
},
},
},
resourceVersion: {
type: 'string',
},
},
required: ['gitconfig'],
};

export const devfileVersionSchema: JSONSchema7 = {
type: 'object',
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { DevWorkspaceApiService } from '../services/devWorkspaceApi';
import { DevWorkspaceTemplateApiService } from '../services/devWorkspaceTemplateApi';
import { DockerConfigApiService } from '../services/dockerConfigApi';
import { EventApiService } from '../services/eventApi';
import { GitConfigApiService } from '../services/gitConfigApi';
import { KubeConfigApiService } from '../services/kubeConfigApi';
import { LogsApiService } from '../services/logsApi';
import { PodApiService } from '../services/podApi';
Expand Down Expand Up @@ -50,6 +51,7 @@ describe('DevWorkspace client', () => {
expect(client.podApi).toBeInstanceOf(PodApiService);
expect(client.serverConfigApi).toBeInstanceOf(ServerConfigApiService);
expect(client.userProfileApi).toBeInstanceOf(UserProfileApiService);
expect(client.gitConfigApi).toBeInstanceOf(GitConfigApiService);
expect(client.gettingStartedSampleApi).toBeInstanceOf(GettingStartedSamplesApiService);
});
});
13 changes: 10 additions & 3 deletions packages/dashboard-backend/src/devworkspaceClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,31 @@ import { DevWorkspaceApiService } from './services/devWorkspaceApi';
import { DevWorkspaceTemplateApiService } from './services/devWorkspaceTemplateApi';
import { DockerConfigApiService } from './services/dockerConfigApi';
import { EventApiService } from './services/eventApi';
import { GettingStartedSamplesApiService } from './services/gettingStartedSamplesApi';
import { GitConfigApiService } from './services/gitConfigApi';
import { KubeConfigApiService } from './services/kubeConfigApi';
import { PodmanApiService } from './services/podmanApi';
import { LogsApiService } from './services/logsApi';
import { PersonalAccessTokenService } from './services/personalAccessTokenApi';
import { PodApiService } from './services/podApi';
import { PodmanApiService } from './services/podmanApi';
import { ServerConfigApiService } from './services/serverConfigApi';
import { UserProfileApiService } from './services/userProfileApi';
import { IGettingStartedSampleApi, IPodmanApi } from './types/index';
import {
IDevWorkspaceApi,
IDevWorkspaceClient,
IDevWorkspaceTemplateApi,
IDockerConfigApi,
IEventApi,
IGettingStartedSampleApi,
IGitConfigApi,
IKubeConfigApi,
ILogsApi,
IPersonalAccessTokenApi,
IPodApi,
IPodmanApi,
IServerConfigApi,
IUserProfileApi,
} from './types';
import { GettingStartedSamplesApiService } from './services/gettingStartedSamplesApi';

export * from './types';

Expand Down Expand Up @@ -91,6 +94,10 @@ export class DevWorkspaceClient implements IDevWorkspaceClient {
return new PersonalAccessTokenService(this.kubeConfig);
}

get gitConfigApi(): IGitConfigApi {
return new GitConfigApiService(this.kubeConfig);
}

get gettingStartedSampleApi(): IGettingStartedSampleApi {
return new GettingStartedSamplesApiService(this.kubeConfig);
}
Expand Down
Loading

0 comments on commit 6304930

Please sign in to comment.