fix typecheck error
This commit is contained in:
parent
86e25ab0cd
commit
f6d7bbc902
@ -1,5 +1,4 @@
|
||||
import type { Octokits } from "../api/client";
|
||||
import { GITHUB_SERVER_URL, USE_GITEA_API } from "../api/config";
|
||||
import { createBranchUrl } from "./comments/common";
|
||||
import { $ } from "bun";
|
||||
|
||||
|
||||
@ -305,5 +305,6 @@ export async function setupBranch(
|
||||
} catch (error) {
|
||||
console.error("Error in branch setup:", error);
|
||||
process.exit(1);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { GITHUB_SERVER_URL, USE_GITEA_API } from "../api/config";
|
||||
import { USE_GITEA_API } from "../api/config";
|
||||
import { createBranchUrl } from "./comments/common";
|
||||
|
||||
export type ExecutionDetails = {
|
||||
@ -162,7 +162,7 @@ export function updateCommentBody(input: CommentUpdateInput): string {
|
||||
const repoMatch = USE_GITEA_API
|
||||
? jobUrl.match(/\/([^\/]+)\/([^\/]+)\/(?:actions|tree|src)/)
|
||||
: jobUrl.match(/github\.com\/([^\/]+)\/([^\/]+)\//);
|
||||
if (repoMatch) {
|
||||
if (repoMatch && repoMatch[1] && repoMatch[2]) {
|
||||
branchUrl = createBranchUrl(
|
||||
repoMatch[1],
|
||||
repoMatch[2],
|
||||
|
||||
@ -151,5 +151,6 @@ export async function setupGitHubToken(): Promise<string> {
|
||||
`Failed to setup GitHub token: ${error}\n\nIf you instead wish to use this action with a custom GitHub token or custom GitHub app, provide a \`github_token\` in the \`uses\` section of the app in your workflow yml file.`,
|
||||
);
|
||||
process.exit(1);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,5 +224,6 @@ export async function prepareMcpConfig(
|
||||
} catch (error) {
|
||||
core.setFailed(`Install MCP server failed with error: ${error}`);
|
||||
process.exit(1);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user