MCPcopy Create free account
hub / github.com/Martian-Engineering/pr-sheriff / parseOwnerRepo

Function parseOwnerRepo

src/github/github_fetch.mjs:6–12  ·  view source on GitHub ↗
(repo)

Source from the content-addressed store, hash-verified

4import { defaultGhRunner } from './gh_api_runner.mjs';
5
6function parseOwnerRepo(repo) {
7 const m = /^([^/]+)\/([^/]+)$/.exec(repo || '');
8 if (!m) {
9 throw new Error(`Invalid repo "${repo}". Expected "owner/name".`);
10 }
11 return { owner: m[1], name: m[2] };
12}
13
14function encodeQuery(params) {
15 const usp = new URLSearchParams();

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected