Skip to content

Commit 8ba2b06

Browse files
committed
Use parseRepositoryNwo instead of splitting manually
1 parent b25bc2e commit 8ba2b06

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎pr-checks/post-comment.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GH_TOKEN=<token> npx tsx ./pr-checks/post-comment.ts \
2121
import assert from "node:assert/strict";
2222
import { parseArgs } from "node:util";
2323

24-
import type { RepositoryNwo } from "../src/repository";
24+
import { parseRepositoryNwo, type RepositoryNwo } from "../src/repository";
2525

2626
import { type ApiClient, getApiClient, resolveToken } from "./api-client";
2727

@@ -77,13 +77,12 @@ export function parseOptions(argv?: string[]): Options {
7777
"Invalid --repository value.",
7878
);
7979

80-
const [owner, repo] = values.repository.split("/");
8180
return {
8281
body: values.body,
8382
marker: values.marker,
8483
createIfMissing: values["create-if-missing"],
8584
issueId: Number(values["issue-id"]),
86-
repository: { owner, repo },
85+
repository: parseRepositoryNwo(values.repository),
8786
};
8887
}
8988

0 commit comments

Comments
 (0)