Skip to content

Commit

Permalink
move error
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroShkvorets committed Feb 5, 2025
1 parent e2e8348 commit 1d4ad51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/maintenance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import { Octokit } from "@octokit/rest";

const issueTitle = "🔍 Daily Maintenance Report";
const [owner, repo] = (process.env.GITHUB_REPOSITORY || "").split("/");
if (!owner || !repo) {
console.error(
"GITHUB_REPOSITORY environment variable is required. This script can only proceed from Github Actions workflow",
);
process.exit(1);
}
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});
const startTime = Date.now();

async function createOrUpdateIssue(errors: string[], warnings: string[]) {
if (!owner || !repo) {
console.error(
"GITHUB_REPOSITORY environment variable is required. This script can only proceed from Github Actions workflow",
);
process.exit(1);
}
const body = `## Maintenance Report (${new Date().toISOString().split("T")[0]})
${
Expand Down
4 changes: 2 additions & 2 deletions src/validate_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ async function testRpc({

if (!response.ok) {
const err = `\`${network.id}\` - failed to query RPC endpoint: ${url}`;
WARNINGS.push(err);
console.error(err);
ERRORS.push(err);
console.error(err + " - " + response.statusText);
return false;
}

Expand Down

0 comments on commit 1d4ad51

Please sign in to comment.