Skip to content

Commit

Permalink
chore: fixed wrong length check on path elements
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen authored and gentlementlegen committed Mar 24, 2024
1 parent c423c4c commit c214587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function getAllTimelineEvents(issueParams: IssueParams): Promise<Gi

export function parseGitHubUrl(url: string): { owner: string; repo: string; issue_number: number } {
const path = new URL(url).pathname.split("/");
if (path.length < 4) {
if (path.length < 5) {
throw new Error(`[parseGitHubUrl] Invalid url: [${url}]`);
}
return {
Expand Down

0 comments on commit c214587

Please sign in to comment.