Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Santoshkumar Sharanappa Nateekar authored and Santoshkumar Sharanappa Nateekar committed Sep 21, 2024
1 parent 84ec822 commit 0245147
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions nala/utils/global.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function getGitHubPRBranchLiveUrl() {
console.info('PR From ORG : ', prFromOrg);
console.info('PR From REPO : ', prFromRepoName);
console.info('PR Branch(U) : ', prBranch);
console.info('PR Number : ', prNumber ? prNumber : 'Auto-PR');
console.info('PR Number : ', prNumber || 'Auto-PR');
console.info('PR From Branch live url : ', prBranchLiveUrl);
} catch (err) {
console.error(`Error => Error in setting PR Branch test URL : ${prBranchLiveUrl}`);
Expand All @@ -66,10 +66,10 @@ async function getGitHubMiloLibsBranchLiveUrl() {
console.info('Milo Libs : ', miloLibs);
} catch (err) {
console.error(
`Error => Error in setting PR Branch test URL : ${prBranchLiveUrl}`
`Error => Error in setting PR Branch test URL : ${prBranchLiveUrl}`,
);
console.info(
`Note: PR branch test url ${prBranchLiveUrl} is not valid, Exiting test execution.`
`Note: PR branch test url ${prBranchLiveUrl} is not valid, Exiting test execution.`,
);
process.exit(1);
}
Expand All @@ -86,10 +86,10 @@ async function getCircleCIBranchLiveUrl() {
} catch (err) {
console.error(
'Error => Error in setting Stage Branch test URL : ',
stageBranchLiveUrl
stageBranchLiveUrl,
);
console.info(
'Note: Stage branch test url is not valid, Exiting test execution.'
'Note: Stage branch test url is not valid, Exiting test execution.',
);
process.exit(1);
}
Expand All @@ -98,14 +98,12 @@ async function getCircleCIBranchLiveUrl() {
async function getLocalBranchLiveUrl() {
let localTestLiveUrl;
try {
const localGitRootDir = execSync('git rev-parse --show-toplevel', {
encoding: 'utf-8',
}).trim();
const localGitRootDir = execSync('git rev-parse --show-toplevel', { encoding: 'utf-8' }).trim();

if (localGitRootDir) {
const gitRemoteOriginUrl = execSync(
'git config --get remote.origin.url',
{ cwd: localGitRootDir, encoding: 'utf-8' }
{ cwd: localGitRootDir, encoding: 'utf-8' },
).trim();
const match = gitRemoteOriginUrl.match(/github\.com\/(.*?)\/(.*?)\.git/);

Expand All @@ -115,8 +113,7 @@ async function getLocalBranchLiveUrl() {
cwd: localGitRootDir,
encoding: 'utf-8',
}).trim();
localTestLiveUrl =
process.env.LOCAL_TEST_LIVE_URL || MAIN_BRANCH_LIVE_URL;
localTestLiveUrl = process.env.LOCAL_TEST_LIVE_URL || MAIN_BRANCH_LIVE_URL;
if (await isBranchURLValid(localTestLiveUrl)) {
console.info('Git ORG : ', localOrg);
console.info('Git REPO : ', localRepo);
Expand All @@ -127,10 +124,10 @@ async function getLocalBranchLiveUrl() {
}
} catch (error) {
console.error(
`Error => Error in setting local test URL : ${localTestLiveUrl}\n`
`Error => Error in setting local test URL : ${localTestLiveUrl}\n`,
);
console.info(
'Note: Local or branch test url is not valid, Exiting test execution.\n'
'Note: Local or branch test url is not valid, Exiting test execution.\n',
);
process.exit(1);
}
Expand Down

0 comments on commit 0245147

Please sign in to comment.