Handle auction deployment when changing to production
This commit is contained in:
parent
b0d3c0593a
commit
93b74074a3
@ -644,15 +644,20 @@ export class Service {
|
|||||||
|
|
||||||
const octokit = await this.getOctokit(user.id);
|
const octokit = await this.getOctokit(user.id);
|
||||||
|
|
||||||
const newDeployment = await this.createDeployment(user.id, octokit, {
|
let newDeployment: Deployment;
|
||||||
project: oldDeployment.project,
|
|
||||||
branch: oldDeployment.branch,
|
|
||||||
environment: Environment.Production,
|
|
||||||
commitHash: oldDeployment.commitHash,
|
|
||||||
commitMessage: oldDeployment.commitMessage,
|
|
||||||
deployer: oldDeployment.deployer
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (oldDeployment.project.auctionId) {
|
||||||
|
newDeployment = await this.createDeploymentFromAuction(oldDeployment.project, oldDeployment.deployer);
|
||||||
|
} else {
|
||||||
|
newDeployment = await this.createDeployment(user.id, octokit, {
|
||||||
|
project: oldDeployment.project,
|
||||||
|
branch: oldDeployment.branch,
|
||||||
|
environment: Environment.Production,
|
||||||
|
commitHash: oldDeployment.commitHash,
|
||||||
|
commitMessage: oldDeployment.commitMessage,
|
||||||
|
deployer: oldDeployment.deployer
|
||||||
|
});
|
||||||
|
}
|
||||||
return newDeployment;
|
return newDeployment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user