MCPcopy
hub / github.com/iterative/cml / ownerRepo

Function ownerRepo

src/drivers/github.js:39–51  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

37};
38
39const ownerRepo = (opts) => {
40 let owner, repo;
41 const { uri } = opts;
42
43 if (uri) {
44 const { pathname } = new URL(uri);
45 [owner, repo] = pathname.substr(1).split('/');
46 } else if (GITHUB_REPOSITORY) {
47 [owner, repo] = GITHUB_REPOSITORY.split('/');
48 }
49
50 return { owner, repo };
51};
52
53const octokit = (token, repo, log) => {
54 if (!token) throw new Error('token not found');

Callers 15

ownerRepoMethod · 0.85
commitCommentCreateMethod · 0.85
commitCommentUpdateMethod · 0.85
commitCommentsMethod · 0.85
commitPrsMethod · 0.85
checkCreateMethod · 0.85
runnerTokenMethod · 0.85
unregisterRunnerMethod · 0.85
runnersMethod · 0.85
runnerByIdMethod · 0.85
runnerJobMethod · 0.85
prCreateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected