From e958d884db31be2be84070a0be1ad0735fd3d4dd Mon Sep 17 00:00:00 2001 From: HugoRCD Date: Sat, 30 Mar 2024 14:29:05 +0100 Subject: [PATCH] docs: use latest md template --- README.md | 24 +++++++++++++++--------- apps/app/server/app/projectService.ts | 5 ++--- apps/cli/README.md | 16 +++++++++++----- apps/cli/package.json | 1 + packages/shelve-types/src/Project.ts | 2 +- 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index a90de4cf..c5ce0199 100644 --- a/README.md +++ b/README.md @@ -34,31 +34,37 @@ COMMANDS Use shelve --help for more information about a command. ``` + + ### Local development - Clone this repository - Install latest LTS version of [Node.js](https://nodejs.org/en/) - Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` - Install dependencies using `bun install` -- Start development server using `bun dev` -- Open [http://localhost:3000](http://localhost:3000) in your browser + + + + ## Contributing To start contributing, you can follow these steps: 1. First raise an issue to discuss the changes you would like to make. 2. Fork the repository. -3. Create a branch with a descriptive name `add-feature` or `fix-issue`. -4. Make changes following the local development steps [above](#local-development). +3. Create a branch using conventional commits and the issue number as the branch name. For example, `feat/123` or `fix/456`. +4. Make changes following the local development steps. 5. Commit your changes following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. -6. Run tests using `bun run test`. -7. Create a pull request following the [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md). - - To be merged, the pull request must pass the tests/workflow and have at least one approval. - - If your changes affect the documentation, make sure to update it. - - If your changes affect the code, make sure to update the tests. +6. If your changes affect the code, run tests using `bun run test`. +7. Create a pull request following the [Pull Request Template](https://github.com/HugoRCD/markdown/blob/main/src/pull_request_template.md). + - To be merged, the pull request must pass the tests/workflow and have at least one approval. + - If your changes affect the documentation, make sure to update it. + - If your changes affect the code, make sure to update the tests. 8. Wait for the maintainers to review your pull request. 9. Once approved, the pull request will be merged in the next release ! + + diff --git a/apps/app/server/app/projectService.ts b/apps/app/server/app/projectService.ts index 8371a7b6..e619003d 100644 --- a/apps/app/server/app/projectService.ts +++ b/apps/app/server/app/projectService.ts @@ -6,7 +6,7 @@ export async function createProject(project: CreateProjectInput, userId: number) const projectAlreadyExists = await isProjectAlreadyExists(project.name, userId) if (projectAlreadyExists) throw new Error('Project already exists') if (project.team) { - return prisma.project.create({ + return await prisma.project.create({ data: { ...project, ownerId: userId, @@ -23,7 +23,7 @@ export async function createProject(project: CreateProjectInput, userId: number) } }) } - return prisma.project.create({ + return await prisma.project.create({ data: { ...project, ownerId: userId, @@ -34,7 +34,6 @@ export async function createProject(project: CreateProjectInput, userId: number) } } }) - } export async function updateProject(project: ProjectUpdateInput, projectId: number, userId: number) { diff --git a/apps/cli/README.md b/apps/cli/README.md index 0df2eb7b..07d1df1c 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -38,14 +38,18 @@ COMMANDS Use shelve --help for more information about a command. ``` + + ### Local development - Clone this repository - Install latest LTS version of [Node.js](https://nodejs.org/en/) - Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` - Install dependencies using `bun install` -- Start development server using `bun dev` -- Open [http://localhost:3000](http://localhost:3000) in your browser + + + + ## Contributing To start contributing, you can follow these steps: @@ -53,16 +57,18 @@ To start contributing, you can follow these steps: 1. First raise an issue to discuss the changes you would like to make. 2. Fork the repository. 3. Create a branch using conventional commits and the issue number as the branch name. For example, `feat/123` or `fix/456`. -4. Make changes following the local development steps [above](#local-development). +4. Make changes following the local development steps. 5. Commit your changes following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. -6. Run tests using `bun run test`. -7. Create a pull request following the [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md). +6. If your changes affect the code, run tests using `bun run test`. +7. Create a pull request following the [Pull Request Template](https://github.com/HugoRCD/markdown/blob/main/src/pull_request_template.md). - To be merged, the pull request must pass the tests/workflow and have at least one approval. - If your changes affect the documentation, make sure to update it. - If your changes affect the code, make sure to update the tests. 8. Wait for the maintainers to review your pull request. 9. Once approved, the pull request will be merged in the next release ! + + Published under the [APACHE](https://github.com/HugoRCD/shelve/blob/main/LICENSE) license. diff --git a/apps/cli/package.json b/apps/cli/package.json index 0b90c504..3767f8da 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -14,6 +14,7 @@ }, "homepage": "https://shelve.hrcd.fr", "scripts": { + "automd": "automd", "build": "automd && unbuild", "start": "node ./dist/index.mjs", "typecheck": "tsc --noEmit", diff --git a/packages/shelve-types/src/Project.ts b/packages/shelve-types/src/Project.ts index 047678d4..d2ab9457 100644 --- a/packages/shelve-types/src/Project.ts +++ b/packages/shelve-types/src/Project.ts @@ -21,13 +21,13 @@ export type Project = { }; export type CreateProjectInput = { - id?: number; name: string; description: string; avatar: string; repository: string; projectManager: string; homepage: string; + users: User[]; team?: Team; };