Skip to content

Commit 3c31f32

Browse files
committed
Release name truncation
1 parent c90bec3 commit 3c31f32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ queue.process('remover', function (job, done){
4949
let branchname = job.data.branch.toLowerCase().replace(/[^a-z0-9]/gi,'-');
5050
const branchname_hash = crypto.createHash('sha256').update(branchname).digest("hex").substring(0, 4);
5151
const branchname_truncated = branchname.substring(0, 15).replace(/\-$/, '');
52-
if (branchname.length >= 25) {
52+
if (branchname.length >= 20) {
5353
branchname = branchname_truncated + '-' + branchname_hash;
5454
}
5555

@@ -60,7 +60,7 @@ queue.process('remover', function (job, done){
6060
// Pass unshortened repo name as environment variable for the namespace.
6161
process.env.NAMESPACE = reponame;
6262

63-
if (reponame.length >= 25) {
63+
if (reponame.length >= 20) {
6464
reponame = reponame_truncated + '-' + reponame_hash;
6565
}
6666

0 commit comments

Comments
 (0)