Save commit message in DB and show in deployments list (#67)

* Display commit message in projects and deployments

* Handle if current deployment not present

* Rename types file

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
2024-02-14 14:25:50 +05:30
committed by GitHub
co-authored by neeraj
parent adba64fd2b
commit db3b9148b6
29 changed files with 144 additions and 128 deletions
@@ -59,6 +59,9 @@ export class Deployment {
@Column('varchar')
commitHash!: string;
@Column('varchar')
commitMessage!: string;
@Column('varchar')
url!: string;
+1
View File
@@ -90,6 +90,7 @@ type Deployment {
domain: Domain
branch: String!
commitHash: String!
commitMessage: String!
url: String!
environment: Environment!
isCurrent: Boolean!
+7 -3
View File
@@ -218,7 +218,8 @@ export class Service {
branch: oldDeployment.branch,
environment: Environment.Production,
domain: prodBranchDomains[0],
commitHash: oldDeployment.commitHash
commitHash: oldDeployment.commitHash,
commitMessage: oldDeployment.commitMessage
});
return newDeployement;
@@ -252,6 +253,7 @@ export class Service {
project: data.project,
branch: data.branch,
commitHash: data.commitHash,
commitMessage: data.commitMessage,
environment: data.environment,
isCurrent: data.isCurrent,
status: DeploymentStatus.Building,
@@ -300,7 +302,8 @@ export class Service {
branch: project.prodBranch,
environment: Environment.Production,
domain: null,
commitHash: latestCommit.sha
commitHash: latestCommit.sha,
commitMessage: latestCommit.commit.message
});
const { registryRecordId, registryRecordData } = await this.registry.createApplicationDeploymentRequest(
@@ -370,7 +373,8 @@ export class Service {
isCurrent: true,
environment: Environment.Production,
domain: oldDeployment.domain,
commitHash: oldDeployment.commitHash
commitHash: oldDeployment.commitHash,
commitMessage: oldDeployment.commitMessage
});
return newDeployement;