-
Notifications
You must be signed in to change notification settings - Fork 3
feat: added basic functioning event templates for defining multiple b… #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2297669
feat: added basic functioning event templates for defining multiple b…
PaulicStudios 2c8f6fb
feat: team create design improvements
PaulicStudios f615372
feat: emitting right docker image to queue now
PaulicStudios 92fe71d
feat: fix github token update and implemented coderabbit improvements
PaulicStudios 66f8ffe
fix: now it does not try to format the game config and server config …
PaulicStudios 5ec5e3b
feat: Add Suspense to the event dashboard page to display a loading f…
PaulicStudios eec5a4a
feat: added template repo version endpoint and replace url in script …
PaulicStudios dcbff86
chore: updated k8s-service dependencies
PaulicStudios db83576
feat: added more output to git clone container; fixes #529
PaulicStudios d5572c3
feat: added replacing of event url in image update script; fixes #539
PaulicStudios 6dc7890
feat: added replacing of event url in image update script; fixes #539
PaulicStudios 35dd1c7
feat: added template repo version endpoint and replace url in script …
PaulicStudios 824e5a4
feat: added replacing of event url in image update script; fixes #539
PaulicStudios a1a7967
Merge branch 'dev' into 537-ability-to-add-different-repo-templates
PaulicStudios 6a4a30a
chore: pnpm i
PaulicStudios 0585367
feat: changed git clone script
PaulicStudios eaa5999
feat: refactor config writing logic into a single utility function in…
PaulicStudios 27a62be
fix: github-service replace right url in scripts
PaulicStudios 35280d0
fix: added validation that template exists in event when creating team
PaulicStudios File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
|
||
| export class EventTemplates1770757438463 implements MigrationInterface { | ||
| name = 'EventTemplates1770757438463' | ||
|
|
||
| public async up(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(`CREATE TABLE "event_starter_templates" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying NOT NULL, "basePath" character varying NOT NULL, "myCoreBotDockerImage" character varying NOT NULL, "eventId" uuid, CONSTRAINT "PK_71a1105f3641c6830dc2ca59178" PRIMARY KEY ("id"))`); | ||
| await queryRunner.query(`ALTER TABLE "teams" ADD "starterTemplateId" uuid`); | ||
| await queryRunner.query(`ALTER TABLE "event_starter_templates" ADD CONSTRAINT "FK_6c691c5b56253870cacd70e0413" FOREIGN KEY ("eventId") REFERENCES "events"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | ||
| await queryRunner.query(`ALTER TABLE "teams" ADD CONSTRAINT "FK_1d9ef4aae433eba4679f8c7671d" FOREIGN KEY ("starterTemplateId") REFERENCES "event_starter_templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | ||
| } | ||
|
|
||
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(`ALTER TABLE "teams" DROP CONSTRAINT "FK_1d9ef4aae433eba4679f8c7671d"`); | ||
| await queryRunner.query(`ALTER TABLE "event_starter_templates" DROP CONSTRAINT "FK_6c691c5b56253870cacd70e0413"`); | ||
| await queryRunner.query(`ALTER TABLE "teams" DROP COLUMN "starterTemplateId"`); | ||
| await queryRunner.query(`DROP TABLE "event_starter_templates"`); | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { IsString, IsNotEmpty } from "class-validator"; | ||
|
|
||
| export class CreateEventStarterTemplateDto { | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| name: string; | ||
|
|
||
| @IsString() | ||
| @IsNotEmpty() | ||
| basePath: string; | ||
|
|
||
| @IsString() | ||
| @IsNotEmpty() | ||
| myCoreBotDockerImage: string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { IsString, IsNotEmpty, IsOptional } from "class-validator"; | ||
|
|
||
| export class UpdateEventStarterTemplateDto { | ||
| @IsString() | ||
| @IsOptional() | ||
| name?: string; | ||
|
|
||
| @IsString() | ||
| @IsOptional() | ||
| basePath?: string; | ||
|
|
||
| @IsString() | ||
| @IsOptional() | ||
| myCoreBotDockerImage?: string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm"; | ||
| import { EventEntity } from "./event.entity"; | ||
| import { Exclude } from "class-transformer"; | ||
|
|
||
| @Entity("event_starter_templates") | ||
| export class EventStarterTemplateEntity { | ||
| @PrimaryGeneratedColumn("uuid") | ||
| id: string; | ||
|
|
||
| @Column() | ||
| name: string; | ||
|
|
||
| @Column() | ||
| basePath: string; | ||
|
|
||
| @Column() | ||
| myCoreBotDockerImage: string; | ||
|
|
||
| @Exclude() | ||
| @ManyToOne(() => EventEntity, (event) => event.starterTemplates, { | ||
| onDelete: "CASCADE", | ||
| }) | ||
| event: EventEntity; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.