Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 5dd44fc

Browse files
authored
Update slack.ts (#605)
* Update slack.ts * Update slack.ts * Update slack.ts * Update slack.ts * Update slack.ts
1 parent 72ab996 commit 5dd44fc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/controllers/v1/slack.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const DeployRepo = async (event: any = {}, context: any = {}): Promise<an
156156
let urlSlug = branchObject.aliasObject.urlSlug; //string or null, string must match value in urlAliases or gitBranchName
157157
const isStableBranch = branchObject.aliasObject.isStableBranch; // bool or Falsey
158158
aliases = aliases?.filter((a) => a);
159-
if (!urlSlug && non_versioned == false) {
159+
if (!urlSlug || !!urlSlug.trim()) {
160160
urlSlug = branchName;
161161
}
162162

@@ -172,12 +172,15 @@ export const DeployRepo = async (event: any = {}, context: any = {}): Promise<an
172172
hashOption,
173173
repoInfo.project,
174174
repoInfo.prefix[c.get<string>('env')],
175-
non_versioned ? '' : branchName,
175+
urlSlug,
176176
false,
177177
false,
178178
'-g'
179179
);
180180
if (!aliases) {
181+
if (non_versioned) {
182+
newPayload.urlSlug = '';
183+
}
181184
depolayable.push(createJob(Object.assign({}, newPayload), jobTitle, jobUserName, jobUserEmail));
182185
jobCount += 1;
183186
}
@@ -199,6 +202,7 @@ export const DeployRepo = async (event: any = {}, context: any = {}): Promise<an
199202
jobCount += 1;
200203
}
201204
if (non_versioned) {
205+
newPayload.urlSlug = '';
202206
depolayable.push(createJob(Object.assign({}, newPayload), jobTitle, jobUserName, jobUserEmail));
203207
jobCount += 1;
204208
} else if (publishOriginalBranchName) {

0 commit comments

Comments
 (0)