@kyuki3rain/cupola 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +184 -0
- package/LICENSE +202 -0
- package/README.md +41 -2
- package/dist/adr.js +106 -0
- package/dist/branch-store.js +73 -0
- package/dist/catalog.js +137 -0
- package/dist/check.js +192 -0
- package/dist/cli.js +8 -0
- package/dist/code.js +216 -0
- package/dist/commands/change.js +728 -0
- package/dist/commands/epic.js +311 -0
- package/dist/commands/execution.js +482 -0
- package/dist/commands/install.js +109 -0
- package/dist/commands/locks.js +243 -0
- package/dist/commands/reaction.js +185 -0
- package/dist/commands/revision.js +139 -0
- package/dist/commands/run.js +1021 -0
- package/dist/commands/setup.js +414 -0
- package/dist/commands/spec.js +80 -0
- package/dist/commands/status.js +1457 -0
- package/dist/commands/trace.js +474 -0
- package/dist/commands/wait.js +105 -0
- package/dist/commands/work.js +126 -0
- package/dist/commands/workspace.js +137 -0
- package/dist/commands/worktree.js +422 -0
- package/dist/config.js +353 -0
- package/dist/day.js +29 -0
- package/dist/e2e-project.js +62 -0
- package/dist/e2e.js +207 -0
- package/dist/engine/cc-sdd.js +164 -0
- package/dist/epic.js +379 -0
- package/dist/execution.js +272 -0
- package/dist/feedback.js +20 -0
- package/dist/frontmatter.js +20 -0
- package/dist/git.js +365 -0
- package/dist/host/git.js +224 -0
- package/dist/host/github.js +387 -0
- package/dist/host/host.js +3 -0
- package/dist/host/index.js +63 -0
- package/dist/install.js +182 -0
- package/dist/io.js +46 -0
- package/dist/main.js +866 -0
- package/dist/method/v1.js +56 -0
- package/dist/reaction.js +110 -0
- package/dist/record.js +507 -0
- package/dist/release.js +84 -0
- package/dist/repo.js +13 -0
- package/dist/runbook.js +132 -0
- package/dist/safe-write.js +80 -0
- package/dist/spec.js +171 -0
- package/dist/status.js +321 -0
- package/dist/templates.js +50 -0
- package/dist/trace.js +275 -0
- package/dist/tracker/files.js +99 -0
- package/dist/tracker/github-issues.js +217 -0
- package/dist/tracker/index.js +34 -0
- package/dist/tracker/tracker.js +69 -0
- package/dist/tree.js +59 -0
- package/dist/trust.js +13 -0
- package/dist/version.js +5 -0
- package/dist/work.js +170 -0
- package/dist/workspace.js +324 -0
- package/npm-shrinkwrap.json +2014 -0
- package/package.json +41 -4
- package/skills/cupola-abort/SKILL.md +51 -0
- package/skills/cupola-adr/SKILL.md +54 -0
- package/skills/cupola-ask/SKILL.md +42 -0
- package/skills/cupola-catalog/SKILL.md +41 -0
- package/skills/cupola-catalog-draft/SKILL.md +116 -0
- package/skills/cupola-complete/SKILL.md +107 -0
- package/skills/cupola-decide/SKILL.md +99 -0
- package/skills/cupola-doc/SKILL.md +52 -0
- package/skills/cupola-e2e-setup/SKILL.md +78 -0
- package/skills/cupola-e2e-test/SKILL.md +115 -0
- package/skills/cupola-epic-accept/SKILL.md +166 -0
- package/skills/cupola-epic-create/SKILL.md +160 -0
- package/skills/cupola-epic-revise/SKILL.md +92 -0
- package/skills/cupola-epic-run/SKILL.md +166 -0
- package/skills/cupola-fix/SKILL.md +117 -0
- package/skills/cupola-init/SKILL.md +143 -0
- package/skills/cupola-intake/SKILL.md +95 -0
- package/skills/cupola-operate/SKILL.md +81 -0
- package/skills/cupola-resolve/SKILL.md +93 -0
- package/skills/cupola-respond/SKILL.md +73 -0
- package/skills/cupola-review/SKILL.md +131 -0
- package/skills/cupola-spec-design/SKILL.md +169 -0
- package/skills/cupola-spec-impl/SKILL.md +137 -0
- package/skills/cupola-spec-run/SKILL.md +137 -0
- package/skills/cupola-steering/SKILL.md +53 -0
- package/skills/cupola-try/SKILL.md +38 -0
- package/templates/install/.kiro/steering/e2e.md +48 -0
- package/templates/install/.kiro/steering/operations.md +109 -0
- package/templates/install/.kiro/steering/principles.md +25 -0
- package/templates/install/CLAUDE.md +19 -0
- package/templates/install/adr/TEMPLATE.md +38 -0
- package/templates/install/cc-sdd/patches.json +31 -0
- package/templates/method-1/behavior-area.md +43 -0
- package/templates/method-1/behavior-index.md +16 -0
- package/templates/method-1/card.md +49 -0
- package/templates/method-1/case-draft.md +25 -0
- package/templates/method-1/case.md +38 -0
- package/templates/method-1/catalog-spec.md +33 -0
- package/templates/method-1/changes/adr.md +4 -0
- package/templates/method-1/changes/catalog.md +29 -0
- package/templates/method-1/changes/doc.md +5 -0
- package/templates/method-1/changes/e2e.md +7 -0
- package/templates/method-1/changes/epic.md +30 -0
- package/templates/method-1/changes/fix.md +21 -0
- package/templates/method-1/changes/release.md +23 -0
- package/templates/method-1/changes/spec.md +55 -0
- package/templates/method-1/changes/system.md +13 -0
- package/templates/method-1/cupola-issue-draft.md +17 -0
- package/templates/method-1/epic.md +147 -0
- package/templates/method-1/execution.md +55 -0
- package/templates/method-1/fix-spec.md +34 -0
- package/templates/method-1/fix.md +39 -0
- package/templates/method-1/lock.json +13 -0
- package/templates/method-1/no-go.md +28 -0
- package/templates/method-1/phase-outcome.json +29 -0
- package/templates/method-1/reaction.md +17 -0
- package/templates/method-1/record.json +63 -0
- package/templates/method-1/report.md +27 -0
- package/templates/method-1/runbook.md +45 -0
- package/templates/method-1/runner-result.json +6 -0
- package/templates/methods.json +13 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { basename, dirname, join } from "node:path";
|
|
3
|
+
import { CONFIG_PATH, cloneName, cloneUrlOf, loadConfig, resolveComponents, } from "./config.js";
|
|
4
|
+
import { git, originDefaultBranch } from "./git.js";
|
|
5
|
+
import { repoOf } from "./host/github.js";
|
|
6
|
+
import { hostFor } from "./host/index.js";
|
|
7
|
+
import { repoRoot } from "./repo.js";
|
|
8
|
+
import { specDocPath } from "./work.js";
|
|
9
|
+
/** The main checkout of the repository containing `cwd`, whichever worktree it is in. */
|
|
10
|
+
export async function mainCheckout(cwd) {
|
|
11
|
+
const common = await git(cwd, ["rev-parse", "--path-format=absolute", "--git-common-dir"]);
|
|
12
|
+
return basename(common) === ".git" ? dirname(common) : repoRoot(cwd);
|
|
13
|
+
}
|
|
14
|
+
async function gitConfig(cwd, key) {
|
|
15
|
+
try {
|
|
16
|
+
const value = await git(cwd, ["config", "--get", key]);
|
|
17
|
+
return value === "" ? undefined : value;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function originSlug(cwd) {
|
|
24
|
+
try {
|
|
25
|
+
return repoOf(await git(cwd, ["remote", "get-url", "origin"]));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** The repositories that keep documents: the hub first, then in the components' order. */
|
|
32
|
+
export function slugsOf(config) {
|
|
33
|
+
const out = [config.hub];
|
|
34
|
+
for (const c of resolveComponents(config))
|
|
35
|
+
if (!same(out, c.repo))
|
|
36
|
+
out.push(c.repo);
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
/** Every repository of a configuration, code included: the hub first, then in the components' order. */
|
|
40
|
+
export function reposOf(config) {
|
|
41
|
+
const out = [config.hub];
|
|
42
|
+
for (const c of resolveComponents(config)) {
|
|
43
|
+
const repo = c.code?.repo ?? c.repo;
|
|
44
|
+
if (!same(out, repo))
|
|
45
|
+
out.push(repo);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
/** Whether two clone URLs name the same repository, a trailing `.git` or slash aside. */
|
|
50
|
+
export function sameUrl(a, b) {
|
|
51
|
+
const norm = (u) => u
|
|
52
|
+
.trim()
|
|
53
|
+
.replace(/\/+$/, "")
|
|
54
|
+
.replace(/\.git$/, "");
|
|
55
|
+
return a !== undefined && b !== undefined && a !== "" && b !== "" && norm(a) === norm(b);
|
|
56
|
+
}
|
|
57
|
+
function same(slugs, slug) {
|
|
58
|
+
return slugs.some((s) => s.toLowerCase() === slug.toLowerCase());
|
|
59
|
+
}
|
|
60
|
+
function canonical(slugs, slug) {
|
|
61
|
+
return slugs.find((s) => s.toLowerCase() === slug.toLowerCase());
|
|
62
|
+
}
|
|
63
|
+
/** The directory a repository is cloned into under the hub: its last path segment. */
|
|
64
|
+
export function cloneDir(hubMain, slug) {
|
|
65
|
+
return join(hubMain, cloneName(slug));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Clones `cupola workspace setup` found under another name than their last
|
|
69
|
+
* path segment (an existing workspace), from the hub's git config
|
|
70
|
+
* `cupola.<owner/name>.checkout`: lowercased slug → directory under the hub.
|
|
71
|
+
*/
|
|
72
|
+
export async function checkoutDirs(hubMain) {
|
|
73
|
+
const out = new Map();
|
|
74
|
+
let list = "";
|
|
75
|
+
try {
|
|
76
|
+
list = await git(hubMain, ["config", "--get-regexp", "^cupola\\..*\\.checkout$"]);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return out; // none recorded
|
|
80
|
+
}
|
|
81
|
+
for (const line of list.split("\n")) {
|
|
82
|
+
const m = /^cupola\.(.+)\.checkout\s+(.+)$/.exec(line.trim());
|
|
83
|
+
if (m?.[1] && m[2])
|
|
84
|
+
out.set(m[1].toLowerCase(), m[2]);
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
/** Which configured repository a checkout is: git config first, then origin. */
|
|
89
|
+
async function identify(main, slugs, config) {
|
|
90
|
+
const named = await gitConfig(main, "cupola.repo");
|
|
91
|
+
if (named)
|
|
92
|
+
return canonical(slugs, named);
|
|
93
|
+
const url = await git(main, ["remote", "get-url", "origin"]).catch(() => "");
|
|
94
|
+
// A repository on another host names its clone URL: origin is that URL, not `owner/name`.
|
|
95
|
+
const byUrl = slugs.find((s) => sameUrl(cloneUrlOf(config, s), url));
|
|
96
|
+
if (byUrl)
|
|
97
|
+
return byUrl;
|
|
98
|
+
const origin = await originSlug(main);
|
|
99
|
+
if (origin) {
|
|
100
|
+
const found = canonical(slugs, origin);
|
|
101
|
+
if (found)
|
|
102
|
+
return found;
|
|
103
|
+
}
|
|
104
|
+
// One repository: whatever origin says (a local path in tests), it is the hub.
|
|
105
|
+
return slugs.length === 1 ? slugs[0] : undefined;
|
|
106
|
+
}
|
|
107
|
+
/** A configured repository with no clone under the hub yet: set up, not broken. */
|
|
108
|
+
export class NotClonedError extends Error {
|
|
109
|
+
repo;
|
|
110
|
+
constructor(repo, dir) {
|
|
111
|
+
super(`${repo} is not cloned at ${dir}: run \`cupola workspace setup\` in the hub`);
|
|
112
|
+
this.repo = repo;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** The workspace of the hub, for `cupola workspace setup`: the checkout it runs in is taken as the hub. */
|
|
116
|
+
export async function workspaceOfHub(io) {
|
|
117
|
+
const ws = await workspace(io, true);
|
|
118
|
+
if (!ws.here.isHub) {
|
|
119
|
+
throw new Error(`${ws.here.main} is ${ws.here.slug}, not the hub ${ws.hub.slug}: run this in the hub`);
|
|
120
|
+
}
|
|
121
|
+
return ws;
|
|
122
|
+
}
|
|
123
|
+
export async function workspace(io, assumeHub = false) {
|
|
124
|
+
const root = await repoRoot(io.cwd);
|
|
125
|
+
const config = await loadConfig(root);
|
|
126
|
+
const slugs = slugsOf(config);
|
|
127
|
+
const repos = reposOf(config);
|
|
128
|
+
const main = await mainCheckout(root);
|
|
129
|
+
const slug = (await identify(main, slugs, config)) ?? (assumeHub ? config.hub : undefined);
|
|
130
|
+
if (!slug) {
|
|
131
|
+
throw new Error(`${main} is none of the configured repositories (${slugs.join(", ")}): run \`cupola workspace setup\` in the hub`);
|
|
132
|
+
}
|
|
133
|
+
const here = { slug, main, isHub: slug === config.hub };
|
|
134
|
+
let hubMain = here.isHub ? main : await gitConfig(main, "cupola.hub");
|
|
135
|
+
if (!hubMain) {
|
|
136
|
+
const parent = dirname(main);
|
|
137
|
+
if (existsSync(join(parent, CONFIG_PATH)) && cloneDir(parent, slug) === main)
|
|
138
|
+
hubMain = parent;
|
|
139
|
+
}
|
|
140
|
+
if (!hubMain) {
|
|
141
|
+
throw new Error(`cannot find the hub ${config.hub} from ${main}: clone the repositories with \`cupola workspace setup\` in the hub`);
|
|
142
|
+
}
|
|
143
|
+
const hub = { slug: config.hub, main: hubMain, isHub: true };
|
|
144
|
+
const dirs = await checkoutDirs(hub.main);
|
|
145
|
+
const codeOnly = new Set(repos.filter((r) => !same(slugs, r)).map((r) => r.toLowerCase()));
|
|
146
|
+
const checkout = (s) => {
|
|
147
|
+
const known = canonical(repos, s);
|
|
148
|
+
if (!known)
|
|
149
|
+
throw new Error(`${s} is not a configured repository`);
|
|
150
|
+
if (known === hub.slug)
|
|
151
|
+
return hub;
|
|
152
|
+
if (known === here.slug)
|
|
153
|
+
return here;
|
|
154
|
+
// Code mounted in the hub's tree is found where every worktree mounts it: its clone's name.
|
|
155
|
+
const named = codeOnly.has(known.toLowerCase()) ? undefined : dirs.get(known.toLowerCase());
|
|
156
|
+
const dir = named ? join(hub.main, named) : cloneDir(hub.main, known);
|
|
157
|
+
if (!existsSync(join(dir, ".git")))
|
|
158
|
+
throw new NotClonedError(known, dir);
|
|
159
|
+
return { slug: known, main: dir, isHub: false };
|
|
160
|
+
};
|
|
161
|
+
const components = resolveComponents(config);
|
|
162
|
+
const component = (name) => {
|
|
163
|
+
const c = components.find((x) => x.name === name);
|
|
164
|
+
if (!c)
|
|
165
|
+
throw new Error(`no component ${name} in the configuration`);
|
|
166
|
+
return c;
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
config,
|
|
170
|
+
root,
|
|
171
|
+
here,
|
|
172
|
+
hub,
|
|
173
|
+
slugs,
|
|
174
|
+
repos,
|
|
175
|
+
checkout,
|
|
176
|
+
repoOf: (name) => {
|
|
177
|
+
const c = component(name);
|
|
178
|
+
return canonical(slugs, c.repo) ?? c.repo;
|
|
179
|
+
},
|
|
180
|
+
codeRepoOf: (name) => {
|
|
181
|
+
const c = component(name);
|
|
182
|
+
const repo = c.code?.repo ?? c.repo;
|
|
183
|
+
return canonical(repos, repo) ?? repo;
|
|
184
|
+
},
|
|
185
|
+
codeOf: (name) => component(name).code,
|
|
186
|
+
host: (io2, s) => {
|
|
187
|
+
const main = checkout(s).main;
|
|
188
|
+
return io2.host ? io2.host(main) : hostFor(config, main, canonical(repos, s) ?? s);
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
async function hasBranch(main, branch) {
|
|
193
|
+
try {
|
|
194
|
+
await git(main, ["rev-parse", "--verify", "--quiet", `refs/heads/${branch}`]);
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
async function onOrigin(main, branch) {
|
|
202
|
+
try {
|
|
203
|
+
await git(main, ["ls-remote", "--exit-code", "--heads", "origin", `refs/heads/${branch}`]);
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/** The epics of the hub, by the folders of its epics directory on origin's default branch (or here). */
|
|
211
|
+
async function hubEpicIds(ws) {
|
|
212
|
+
const base = await originDefaultBranch(ws.hub.main);
|
|
213
|
+
const list = await git(ws.hub.main, [
|
|
214
|
+
"ls-tree",
|
|
215
|
+
"-d",
|
|
216
|
+
"--name-only",
|
|
217
|
+
base ? `refs/remotes/origin/${base}` : "HEAD",
|
|
218
|
+
`${ws.config.paths.epics}/`,
|
|
219
|
+
]).catch(() => "");
|
|
220
|
+
return list
|
|
221
|
+
.split("\n")
|
|
222
|
+
.filter((f) => f !== "")
|
|
223
|
+
.map((f) => f.slice(ws.config.paths.epics.length + 1));
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The component a work id names by the method's naming: a spec
|
|
227
|
+
* of an epic `<epic>-<component>`, a follow-up `-<n>`, a fix spec `-fix-<n>`,
|
|
228
|
+
* and the e2e setup `e2e-<component>`.
|
|
229
|
+
*/
|
|
230
|
+
async function componentByName(ws, id) {
|
|
231
|
+
const names = resolveComponents(ws.config).map((c) => c.name);
|
|
232
|
+
const e2e = /^e2e-(.+)$/.exec(id)?.[1];
|
|
233
|
+
if (e2e && names.includes(e2e))
|
|
234
|
+
return e2e;
|
|
235
|
+
for (const epic of await hubEpicIds(ws)) {
|
|
236
|
+
if (!id.startsWith(`${epic}-`))
|
|
237
|
+
continue;
|
|
238
|
+
const rest = id.slice(epic.length + 1);
|
|
239
|
+
const c = names.find((n) => rest === n || new RegExp(`^${n}-(\\d+|fix-\\d+)$`).test(rest));
|
|
240
|
+
if (c)
|
|
241
|
+
return c;
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The repository a work item lives in: a component it is given; the
|
|
247
|
+
* repository where its branch already is, locally or on origin; the component
|
|
248
|
+
* its id names; otherwise the hub (cases' epics, ADRs, steering).
|
|
249
|
+
*/
|
|
250
|
+
export async function locateWork(ws, id, opts) {
|
|
251
|
+
if (ws.slugs.length === 1)
|
|
252
|
+
return ws.hub;
|
|
253
|
+
if (opts.component)
|
|
254
|
+
return ws.checkout(ws.repoOf(opts.component));
|
|
255
|
+
const cloned = ws.slugs.flatMap((s) => {
|
|
256
|
+
try {
|
|
257
|
+
return [ws.checkout(s)];
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
return [];
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
for (const c of cloned)
|
|
264
|
+
if (await hasBranch(c.main, opts.branch))
|
|
265
|
+
return c;
|
|
266
|
+
const named = await componentByName(ws, id);
|
|
267
|
+
if (named)
|
|
268
|
+
return ws.checkout(ws.repoOf(named));
|
|
269
|
+
for (const c of cloned)
|
|
270
|
+
if (await onOrigin(c.main, opts.branch))
|
|
271
|
+
return c;
|
|
272
|
+
// Merged and its branch gone: its document is on the default branch of its repository.
|
|
273
|
+
for (const c of cloned)
|
|
274
|
+
if (await hasDocument(c, id))
|
|
275
|
+
return c;
|
|
276
|
+
return ws.hub;
|
|
277
|
+
}
|
|
278
|
+
/** Whether a repository's default branch (or its checkout) has the work's document. */
|
|
279
|
+
async function hasDocument(repo, id) {
|
|
280
|
+
const base = await originDefaultBranch(repo.main);
|
|
281
|
+
if (base) {
|
|
282
|
+
// Clones are never pulled: what was merged since is on origin, not in the tracking ref.
|
|
283
|
+
await git(repo.main, [
|
|
284
|
+
"fetch",
|
|
285
|
+
"--quiet",
|
|
286
|
+
"origin",
|
|
287
|
+
`+refs/heads/${base}:refs/remotes/origin/${base}`,
|
|
288
|
+
]).catch(() => "");
|
|
289
|
+
}
|
|
290
|
+
const refs = [...(base ? [`refs/remotes/origin/${base}`] : []), "HEAD"];
|
|
291
|
+
const paths = [`.kiro/specs/${id}/spec.json`, specDocPath(id)];
|
|
292
|
+
for (const ref of refs) {
|
|
293
|
+
for (const path of paths) {
|
|
294
|
+
try {
|
|
295
|
+
await git(repo.main, ["cat-file", "-e", `${ref}:${path}`]);
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
// not there
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* The repositories an epic touches: the hub, which holds the
|
|
307
|
+
* epic's own record and acceptance-check scripts, then each repository of its
|
|
308
|
+
* specs' components' code, in the configuration's order. Each is checked out:
|
|
309
|
+
* its main checkout, or the checkout the command runs in when it is that one.
|
|
310
|
+
*/
|
|
311
|
+
export function epicRepos(ws, components) {
|
|
312
|
+
const wanted = new Set(components.map((c) => ws.codeRepoOf(c)));
|
|
313
|
+
return ws.repos
|
|
314
|
+
.filter((s) => s === ws.hub.slug || wanted.has(s))
|
|
315
|
+
.map((s) => (s === ws.here.slug ? { ...ws.here, main: ws.root } : ws.checkout(s)));
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Which configured repository a checkout is, without needing the hub: for a
|
|
319
|
+
* checkout outside any workspace (a temporary clone, CI). Undefined when it
|
|
320
|
+
* cannot tell.
|
|
321
|
+
*/
|
|
322
|
+
export async function identifyRepo(root, config) {
|
|
323
|
+
return identify(await mainCheckout(root), slugsOf(config), config);
|
|
324
|
+
}
|