Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Mar 29, 2024
1 parent 9ab18c0 commit a29cc6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions action/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -188162,18 +188162,12 @@ const robot = (app) => {
repo: context.repo().repo,
path: tokensDirPath,
});
console.log({ response });
const tokenTicker = tokenName.split("-")[0];
console.log(`token: ${tokenName}. token ticker: ${tokenTicker}`);
if (!tokenTicker) {
return;
}
const tokensDirectories = (response.data && response.data.length) ? response.data : [];
const subdirectories = tokensDirectories.filter((content) => content?.type === "dir" && content?.name?.startsWith(tokenTicker));
for (const dir of subdirectories) {
const result = dir.name.startsWith(`${tokenTicker}-`);
console.log(`dir name=${dir.name}. starts with ${tokenTicker}-: ${result}`);
}
if (subdirectories.length) {
await fail(`Token with ticker ${tokenTicker} already exists!`);
}
Expand Down
7 changes: 0 additions & 7 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ export const robot = (app: Probot) => {
path: tokensDirPath,
});

console.log({ response });
const tokenTicker = tokenName.split("-")[0];
console.log(`token: ${tokenName}. token ticker: ${tokenTicker}`);
if (!tokenTicker) {
return;
}
Expand All @@ -245,11 +243,6 @@ export const robot = (app: Probot) => {
(content) => content?.type === "dir" && content?.name?.startsWith(tokenTicker),
);

for(const dir of subdirectories) {
const result = dir.name.startsWith(`${tokenTicker}-`);
console.log(`dir name=${dir.name}. starts with ${tokenTicker}-: ${result}`);
}

if (subdirectories.length) {
await fail(`Token with ticker ${tokenTicker} already exists!`);
}
Expand Down

0 comments on commit a29cc6f

Please sign in to comment.