chore: remove all .substring() usage (#6352)
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
@ -88,7 +88,7 @@ async function prepareTestBitBucketRepo({ lfs }) {
|
||||
// postfix a random string to avoid collisions
|
||||
const postfix = Math.random()
|
||||
.toString(32)
|
||||
.substring(2);
|
||||
.slice(2);
|
||||
const testRepoName = `${repo}-${Date.now()}-${postfix}`;
|
||||
|
||||
console.log('Creating repository', testRepoName);
|
||||
|
@ -61,7 +61,7 @@ async function prepareTestGitHubRepo() {
|
||||
// postfix a random string to avoid collisions
|
||||
const postfix = Math.random()
|
||||
.toString(32)
|
||||
.substring(2);
|
||||
.slice(2);
|
||||
const testRepoName = `${repo}-${Date.now()}-${postfix}`;
|
||||
|
||||
const client = getGitHubClient(token);
|
||||
|
@ -52,7 +52,7 @@ async function prepareTestGitLabRepo() {
|
||||
// postfix a random string to avoid collisions
|
||||
const postfix = Math.random()
|
||||
.toString(32)
|
||||
.substring(2);
|
||||
.slice(2);
|
||||
const testRepoName = `${repo}-${Date.now()}-${postfix}`;
|
||||
|
||||
const client = getGitLabClient(token);
|
||||
|
@ -61,7 +61,7 @@ let serverProcess;
|
||||
async function setupProxy(options) {
|
||||
const postfix = Math.random()
|
||||
.toString(32)
|
||||
.substring(2);
|
||||
.slice(2);
|
||||
|
||||
const testRepoName = `proxy-test-repo-${Date.now()}-${postfix}`;
|
||||
const tempDir = path.join('.temp', testRepoName);
|
||||
|
Reference in New Issue
Block a user