Skip to content

Commit 5550be1

Browse files
JanKoehnleinroboquat
authored andcommitted
[protocol] use owner and repo in lower case in ws IDs
1 parent 932a33a commit 5550be1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

components/gitpod-protocol/src/util/generate-workspace-id.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const expect = chai.expect
3434
['gitpod-io','gitpod','gitpodio-gitpod-'],
3535
['this is rather long and has some "§$"% special chars','also here pretty long and needs abbreviation','thisisratherlon-alsohere-'],
3636
['breatheco-de', 'python-flask-api-tutorial', 'breathecode-pythonflaska-'],
37+
['UPPER', "CaSe", "upper-case-"]
3738
]
3839
for (const d of data) {
3940
const id = await generateWorkspaceID(d[0], d[1]);

components/gitpod-protocol/src/util/generate-workspace-id.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function clean(segment: string | undefined, maxChars: number = 15) {
1515
if (!segment) {
1616
return undefined;
1717
}
18+
segment = segment.toLowerCase();
1819
let result = '';
1920
for (let i =0; i < segment.length; i++) {
2021
if (characters.indexOf(segment[i]) !== -1) {

0 commit comments

Comments
 (0)