pi-odd-worktree 2.1.0 → 3.0.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/README.md +54 -319
- package/extensions/odd-worktree-tools.ts +4145 -2529
- package/lib/bash-activity.js +1164 -0
- package/lib/bash-design.js +684 -0
- package/lib/bash-destructive.js +559 -0
- package/lib/bash-frame.js +205 -0
- package/lib/card-content.js +23 -0
- package/lib/card-style.js +175 -0
- package/lib/checkout-facts.js +30 -70
- package/lib/codegraph-card-preview.js +628 -0
- package/lib/codegraph-card.js +515 -0
- package/lib/codegraph-compaction.js +76 -0
- package/lib/codegraph-daemon.js +246 -0
- package/lib/codegraph-edit-sync.js +182 -0
- package/lib/codegraph-guard-target.js +337 -0
- package/lib/codegraph-guard.js +211 -0
- package/lib/codegraph-index.js +1020 -0
- package/lib/codegraph-lock.js +607 -0
- package/lib/codegraph-mcp-config.js +134 -0
- package/lib/codegraph-mcp.js +123 -0
- package/lib/codegraph-paths.js +69 -0
- package/lib/codegraph-prompt/explore.md +11 -0
- package/lib/codegraph-prompt/fix.md +6 -0
- package/lib/codegraph-prompt/generic.md +8 -0
- package/lib/codegraph-prompt/judge.md +9 -0
- package/lib/codegraph-prompt/orchestrator.md +17 -0
- package/lib/codegraph-prompt/verify.md +10 -0
- package/lib/codegraph-prompt/worker.md +7 -0
- package/lib/codegraph-role.js +55 -0
- package/lib/codegraph-rules.js +146 -0
- package/lib/codegraph-session.js +303 -383
- package/lib/codegraph-warmup.js +139 -0
- package/lib/file-card-markdown.js +141 -0
- package/lib/file-card-resolver.js +245 -0
- package/lib/file-card.js +659 -0
- package/lib/files-index.js +387 -0
- package/lib/files-insert.js +81 -0
- package/lib/files-orders.js +326 -0
- package/lib/files-picker-view.js +1416 -0
- package/lib/files-preview.js +338 -0
- package/lib/files-scope-detail.js +171 -0
- package/lib/files-scope-view.js +507 -0
- package/lib/gh-issues.js +308 -14
- package/lib/issue-preview.js +26 -7
- package/lib/issues-bash-mutation.js +206 -0
- package/lib/issues-cache-store.js +261 -0
- package/lib/issues-section.js +710 -0
- package/lib/issues-view.js +649 -52
- package/lib/odd-prompt/odd-worktrees.md +21 -0
- package/lib/odd-worktrees-prompt.js +10 -28
- package/lib/related-issues-cache.js +210 -0
- package/lib/shell-card.js +825 -0
- package/lib/skill-odd-card.js +183 -0
- package/lib/tui-paint.js +4 -5
- package/lib/warp-create-panel.js +538 -250
- package/lib/warp-create-picker.js +56 -9
- package/lib/warp-delete-confirm.js +19 -28
- package/lib/warp-selector-view.js +160 -82
- package/lib/which-command.js +90 -0
- package/lib/worktree-card.js +267 -897
- package/lib/worktree-cards.js +383 -0
- package/lib/worktree-create.js +287 -0
- package/lib/worktree-git.js +3 -3
- package/lib/worktree-guard.js +548 -0
- package/lib/worktree-hooks.js +421 -712
- package/lib/worktree-list.js +120 -0
- package/lib/worktree-registry.js +162 -879
- package/lib/{worktree-close-herdr.js → worktree-remove.js} +9 -11
- package/lib/worktree-setup-runner.js +376 -0
- package/lib/worktree-setup.js +140 -0
- package/lib/worktree-warp-busy.js +462 -85
- package/lib/worktree-warp-sessions.js +1 -2
- package/package.json +2 -2
- package/tools/bash-activity.test.js +1419 -0
- package/tools/bash-design.test.js +1091 -0
- package/tools/bash-destructive.test.js +139 -0
- package/tools/card-content.test.js +44 -0
- package/tools/card-style.test.js +298 -0
- package/tools/codegraph-card-preview.test.js +254 -0
- package/tools/codegraph-card.test.js +1080 -0
- package/tools/codegraph-compaction.test.js +378 -0
- package/tools/codegraph-daemon.test.js +248 -0
- package/tools/codegraph-edit-sync.test.js +295 -0
- package/tools/codegraph-guard-target.test.js +174 -0
- package/tools/codegraph-guard.test.js +238 -0
- package/tools/codegraph-index.test.js +1948 -0
- package/tools/codegraph-lock.test.js +932 -0
- package/tools/codegraph-mcp-config.test.js +181 -0
- package/tools/codegraph-mcp.test.js +194 -0
- package/tools/codegraph-paths.test.js +44 -0
- package/tools/codegraph-role.test.js +30 -0
- package/tools/codegraph-rules.test.js +250 -0
- package/tools/codegraph-session.test.js +660 -391
- package/tools/codegraph-warmup.test.js +316 -0
- package/tools/commands.test.js +510 -31
- package/tools/file-card-markdown.test.js +188 -0
- package/tools/file-card.test.js +1289 -0
- package/tools/files-bridge.test.js +575 -0
- package/tools/files-command.test.js +610 -0
- package/tools/files-index.test.js +473 -0
- package/tools/files-insert.test.js +139 -0
- package/tools/files-orders.test.js +597 -0
- package/tools/files-picker-view.test.js +1871 -0
- package/tools/files-preview.test.js +452 -0
- package/tools/files-scope-detail.test.js +264 -0
- package/tools/files-scope-view.test.js +614 -0
- package/tools/fixtures/card-codegraph-outputs.js +110 -0
- package/tools/fixtures/codegraph-cli-stub.js +16 -0
- package/tools/fixtures/codegraph-init-process.js +28 -0
- package/tools/fixtures/codegraph-lock-worker.js +117 -0
- package/tools/fixtures/daemon-fake.js +98 -0
- package/tools/fixtures/daemon-mcp-server.js +39 -0
- package/tools/fixtures/daemon-warmup-worker.js +12 -0
- package/tools/fixtures/load-extension.js +136 -3
- package/tools/gh-issues-feedback.test.js +31 -7
- package/tools/gh-issues.test.js +391 -1
- package/tools/issue-preview.test.js +44 -7
- package/tools/issues-bash-mutation.test.js +101 -0
- package/tools/issues-cache-store.test.js +222 -0
- package/tools/issues-command.test.js +1512 -66
- package/tools/issues-open-guard.test.js +1096 -0
- package/tools/issues-section.test.js +4195 -0
- package/tools/issues-seed-query-regression.test.js +67 -0
- package/tools/issues-view.test.js +1489 -60
- package/tools/odd-worktrees-prompt.test.js +98 -65
- package/tools/package-surface.test.js +431 -36
- package/tools/related-issues-cache.test.js +324 -0
- package/tools/shell-card.test.js +834 -0
- package/tools/skill-odd-card.test.js +200 -0
- package/tools/t5-session-identity.test.js +44 -22
- package/tools/warp-busy-guard.test.js +2565 -309
- package/tools/warp-create-panel.test.js +499 -74
- package/tools/warp-create-picker.test.js +101 -5
- package/tools/warp-delete-confirm.test.js +49 -15
- package/tools/warp-empty-session.test.js +0 -1
- package/tools/warp-fallback-regression.test.js +533 -0
- package/tools/warp-selector-view.test.js +460 -196
- package/tools/which-command.test.js +126 -0
- package/tools/worktree-card.test.js +551 -0
- package/tools/worktree-cards.test.js +845 -0
- package/tools/worktree-changes.test.js +4 -5
- package/tools/worktree-create.test.js +489 -0
- package/tools/worktree-guard.test.js +823 -0
- package/tools/worktree-hooks.test.js +905 -0
- package/tools/worktree-list.test.js +170 -0
- package/tools/worktree-registry.test.js +89 -230
- package/tools/worktree-remove-async.test.js +318 -0
- package/tools/worktree-setup-runner.test.js +276 -0
- package/tools/worktree-setup.test.js +140 -0
- package/tools/worktree-tools.test.js +419 -199
- package/lib/codegraph-commands.js +0 -165
- package/lib/odd-prompt/odd-worktrees.with-codegraph.md +0 -19
- package/lib/odd-prompt/odd-worktrees.without-codegraph.md +0 -15
- package/lib/worktree-model-result.js +0 -291
- package/tools/codegraph-commands.test.js +0 -371
- package/tools/herdr-free-create.test.js +0 -161
- package/tools/worktree-close-herdr-async.test.js +0 -204
- package/tools/worktree-odd-migration.test.js +0 -224
- package/tools/worktree-registry-cache.test.js +0 -163
- package/tools/worktree-registry-odd.test.js +0 -231
package/tools/gh-issues.test.js
CHANGED
|
@@ -183,7 +183,7 @@ describe('repository permissions from viewerPermission', () => {
|
|
|
183
183
|
viewerPermission: role,
|
|
184
184
|
issue: {
|
|
185
185
|
assignees: { nodes: [], pageInfo: { hasNextPage: false } },
|
|
186
|
-
closedByPullRequestsReferences: {
|
|
186
|
+
closedByPullRequestsReferences: { nodes: [], pageInfo: { hasNextPage: false } },
|
|
187
187
|
},
|
|
188
188
|
} } }));
|
|
189
189
|
}
|
|
@@ -1500,3 +1500,393 @@ describe('fork scope (S5)', () => {
|
|
|
1500
1500
|
'every call carries the enterprise host');
|
|
1501
1501
|
});
|
|
1502
1502
|
});
|
|
1503
|
+
|
|
1504
|
+
// ---------------------------------------------------------------------------
|
|
1505
|
+
// S9 (issues-sidebar, T14): ONE combined read of the three scoped views.
|
|
1506
|
+
//
|
|
1507
|
+
// `listRelatedIssues` replaces the assigned-only `gh issue list` read and the
|
|
1508
|
+
// separate pull-request marker read (T9's `listIssuePullRequestReferences`). It
|
|
1509
|
+
// is one `gh api graphql` request with three aliased searches, each in the same
|
|
1510
|
+
// `repo:<owner>/<name> is:issue is:open` scope, and every row is normalized like
|
|
1511
|
+
// a panel row. The marker fact — and its number (T9, S8) — rides the same node
|
|
1512
|
+
// selection, so it costs no extra call, and every failure shape is
|
|
1513
|
+
// `{ ok: false }`.
|
|
1514
|
+
// ---------------------------------------------------------------------------
|
|
1515
|
+
describe('listRelatedIssues: one combined read of the three scoped views', () => {
|
|
1516
|
+
const IDENTITY = 'github.com/myfork/project';
|
|
1517
|
+
|
|
1518
|
+
function issueNode(number, extra = {}) {
|
|
1519
|
+
return {
|
|
1520
|
+
number,
|
|
1521
|
+
title: `Issue ${number}`,
|
|
1522
|
+
state: 'OPEN',
|
|
1523
|
+
stateReason: null,
|
|
1524
|
+
url: `https://github.com/myfork/project/issues/${number}`,
|
|
1525
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
1526
|
+
updatedAt: '2024-02-01T00:00:00Z',
|
|
1527
|
+
author: { login: 'octocat' },
|
|
1528
|
+
labels: { nodes: [] },
|
|
1529
|
+
comments: { totalCount: 0 },
|
|
1530
|
+
reactionGroups: [],
|
|
1531
|
+
timelineItems: { nodes: [] },
|
|
1532
|
+
...extra,
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
function relatedJson({ mine = [], assigned = [], involved = [], counts = {} } = {}) {
|
|
1537
|
+
const bucket = (key, rows) => ({
|
|
1538
|
+
issueCount: Number.isInteger(counts[key]) ? counts[key] : rows.length,
|
|
1539
|
+
nodes: rows,
|
|
1540
|
+
});
|
|
1541
|
+
return JSON.stringify({
|
|
1542
|
+
data: {
|
|
1543
|
+
mine: bucket('mine', mine),
|
|
1544
|
+
assigned: bucket('assigned', assigned),
|
|
1545
|
+
involved: bucket('involved', involved),
|
|
1546
|
+
},
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
function queryOf(call) {
|
|
1551
|
+
const at = call.argv.indexOf('-f');
|
|
1552
|
+
assert.ok(at >= 0 && at + 1 < call.argv.length, 'the read sends one query argument');
|
|
1553
|
+
const raw = call.argv[at + 1];
|
|
1554
|
+
return raw.startsWith('query=') ? raw.slice('query='.length) : raw;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
test('sends exactly ONE gh api graphql call carrying the three aliased searches', async () => {
|
|
1558
|
+
const calls = [];
|
|
1559
|
+
ghIssues.setGhRunner(async (bin, argv, runOpts = {}) => {
|
|
1560
|
+
calls.push({ bin, argv: argv.slice(), env: { ...(runOpts.env || {}) } });
|
|
1561
|
+
return okJson(relatedJson({
|
|
1562
|
+
mine: [issueNode(1)],
|
|
1563
|
+
assigned: [issueNode(2)],
|
|
1564
|
+
involved: [issueNode(3)],
|
|
1565
|
+
counts: { mine: 1, assigned: 5, involved: 2 },
|
|
1566
|
+
}));
|
|
1567
|
+
});
|
|
1568
|
+
|
|
1569
|
+
const result = await ghIssues.listRelatedIssues({ first: 37 }, { scope: IDENTITY });
|
|
1570
|
+
|
|
1571
|
+
assert.equal(result.ok, true);
|
|
1572
|
+
assert.equal(calls.length, 1, 'one child serves every bucket');
|
|
1573
|
+
assert.deepEqual(calls[0].argv.slice(0, 3), ['api', 'graphql', '-f'], 'fixed argv, never a shell string');
|
|
1574
|
+
assert.equal(calls[0].env.GH_REPO, IDENTITY, 'the read carries the proven identity');
|
|
1575
|
+
|
|
1576
|
+
const query = queryOf(calls[0]);
|
|
1577
|
+
assert.equal(/rateLimit/.test(query), false, 'the measured cost field is not asked for');
|
|
1578
|
+
assert.equal((query.match(/first: 37/g) || []).length, 3, 'the requested first reaches every alias');
|
|
1579
|
+
assert.ok(query.includes('mine: search'), 'the mine alias is present');
|
|
1580
|
+
assert.ok(query.includes('assigned: search'), 'the assigned alias is present');
|
|
1581
|
+
assert.ok(query.includes('involved: search'), 'the involved alias is present');
|
|
1582
|
+
for (const qualifier of ['author:@me', 'assignee:@me', 'involves:@me -author:@me']) {
|
|
1583
|
+
assert.ok(
|
|
1584
|
+
query.includes(`repo:myfork/project is:issue is:open ${qualifier} sort:updated-desc`),
|
|
1585
|
+
`the ${qualifier} search is scoped, open, sorted and typed`,
|
|
1586
|
+
);
|
|
1587
|
+
}
|
|
1588
|
+
assert.equal((query.match(/type: ISSUE/g) || []).length, 3);
|
|
1589
|
+
assert.ok(query.includes('issueCount'), 'each alias reports its exact count');
|
|
1590
|
+
assert.ok(query.includes('timelineItems(last: 10, itemTypes: [CROSS_REFERENCED_EVENT])'),
|
|
1591
|
+
'the pull-request marker rides the same node selection, reading the NEWEST events');
|
|
1592
|
+
assert.equal(/timelineItems\(first:/.test(query), false,
|
|
1593
|
+
'never the oldest window: the marker names the newest pull request (S3)');
|
|
1594
|
+
// T9 (S8): the marker is a NUMBER, so the cross-referenced source carries it.
|
|
1595
|
+
assert.ok(query.includes('... on PullRequest { number }'),
|
|
1596
|
+
'the pull-request source selection asks for its number');
|
|
1597
|
+
// T10 (S9): the row the rail caches is the panel\'s seed, so it carries the
|
|
1598
|
+
// assignees the first frame shows.
|
|
1599
|
+
assert.ok(query.includes('assignees(first: 10) { nodes { login } }'),
|
|
1600
|
+
'the row selection carries the assignees a seeded first frame shows');
|
|
1601
|
+
|
|
1602
|
+
assert.deepEqual(Object.keys(result.buckets).sort(), ['assigned', 'involved', 'mine']);
|
|
1603
|
+
assert.equal(result.buckets.mine.issueCount, 1);
|
|
1604
|
+
assert.equal(result.buckets.assigned.issueCount, 5);
|
|
1605
|
+
assert.equal(result.buckets.involved.issueCount, 2);
|
|
1606
|
+
assert.deepEqual(result.buckets.assigned.issues.map((row) => row.number), [2]);
|
|
1607
|
+
});
|
|
1608
|
+
|
|
1609
|
+
test('normalizes every row exactly like a panel row', async () => {
|
|
1610
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1611
|
+
mine: [issueNode(7, {
|
|
1612
|
+
title: 'A real title',
|
|
1613
|
+
state: 'OPEN',
|
|
1614
|
+
labels: { nodes: [{ name: 'bug', color: 'ff0000', description: 'Broken' }] },
|
|
1615
|
+
comments: { totalCount: 4 },
|
|
1616
|
+
author: { login: 'someone' },
|
|
1617
|
+
reactionGroups: [
|
|
1618
|
+
{ content: 'THUMBS_UP', users: { totalCount: 2 } },
|
|
1619
|
+
{ content: 'HEART', users: { totalCount: 1 } },
|
|
1620
|
+
],
|
|
1621
|
+
})],
|
|
1622
|
+
})));
|
|
1623
|
+
|
|
1624
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1625
|
+
assert.equal(result.ok, true);
|
|
1626
|
+
const row = result.buckets.mine.issues[0];
|
|
1627
|
+
assert.equal(row.number, 7);
|
|
1628
|
+
assert.equal(row.title, 'A real title');
|
|
1629
|
+
assert.equal(row.state, 'open', 'the panel row lowercases the GraphQL state');
|
|
1630
|
+
assert.equal(row.author, 'someone');
|
|
1631
|
+
assert.equal(row.commentsCount, 4);
|
|
1632
|
+
assert.deepEqual(row.labels, [{ name: 'bug', color: 'ff0000', description: 'Broken' }]);
|
|
1633
|
+
assert.deepEqual(row.reactions, { total: 3, plusOne: 2 });
|
|
1634
|
+
assert.equal(row.body, '');
|
|
1635
|
+
assert.equal(row.isPullRequest, false);
|
|
1636
|
+
});
|
|
1637
|
+
|
|
1638
|
+
test('derives hasPullRequest and its number from PullRequest sources only', async () => {
|
|
1639
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1640
|
+
assigned: [
|
|
1641
|
+
issueNode(11, { timelineItems: { nodes: [{ source: { __typename: 'PullRequest', number: 69 } }] } }),
|
|
1642
|
+
issueNode(12, {
|
|
1643
|
+
timelineItems: {
|
|
1644
|
+
nodes: [
|
|
1645
|
+
{ source: { __typename: 'Issue', number: 5 } },
|
|
1646
|
+
{ source: { __typename: 'PullRequest', number: 70 } },
|
|
1647
|
+
{ source: { __typename: 'PullRequest', number: 71 } },
|
|
1648
|
+
],
|
|
1649
|
+
},
|
|
1650
|
+
}),
|
|
1651
|
+
issueNode(13, { timelineItems: { nodes: [{ source: { __typename: 'Issue', number: 6 } }] } }),
|
|
1652
|
+
issueNode(14, { timelineItems: { nodes: [] } }),
|
|
1653
|
+
],
|
|
1654
|
+
})));
|
|
1655
|
+
|
|
1656
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1657
|
+
assert.equal(result.ok, true);
|
|
1658
|
+
assert.deepEqual(
|
|
1659
|
+
result.buckets.assigned.issues.map((row) => row.hasPullRequest),
|
|
1660
|
+
[true, true, false, false],
|
|
1661
|
+
'one or many pull requests are the same true, and an Issue source is false',
|
|
1662
|
+
);
|
|
1663
|
+
// S8 (T9) + S3 (issues-sidebar-click T2): the row carries the number, and
|
|
1664
|
+
// the LAST one when an issue has several pull requests — the timeline is
|
|
1665
|
+
// read with `last:`, so the newest event is the newest pull request; an
|
|
1666
|
+
// issue source or no reference is `null`, never a number nobody opened.
|
|
1667
|
+
assert.deepEqual(
|
|
1668
|
+
result.buckets.assigned.issues.map((row) => row.pullRequestNumber),
|
|
1669
|
+
[69, 71, null, null],
|
|
1670
|
+
'the newest pull-request number rides the row, and an issue reference is none',
|
|
1671
|
+
);
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
// S3 (issues-sidebar-click T2): GraphQL returns `timelineItems` in
|
|
1675
|
+
// chronological order, so `first: 10` is the OLDEST ten events and its first
|
|
1676
|
+
// pull request is the oldest one referencing the issue. The mark the rail
|
|
1677
|
+
// paints must name the MOST RECENT referencing pull request, and the cost
|
|
1678
|
+
// must stay ONE request for the three views: reading the window from the end
|
|
1679
|
+
// costs nothing extra.
|
|
1680
|
+
test('asks for the last events, so the marker window holds the newest ones', async () => {
|
|
1681
|
+
const calls = [];
|
|
1682
|
+
ghIssues.setGhRunner(async (bin, argv, runOpts = {}) => {
|
|
1683
|
+
calls.push({ bin, argv: argv.slice(), env: { ...(runOpts.env || {}) } });
|
|
1684
|
+
return okJson(relatedJson({ assigned: [issueNode(31)] }));
|
|
1685
|
+
});
|
|
1686
|
+
|
|
1687
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1688
|
+
assert.equal(result.ok, true);
|
|
1689
|
+
assert.equal(calls.length, 1, 'the three views still cost exactly ONE graphql request');
|
|
1690
|
+
assert.deepEqual(calls[0].argv.slice(0, 3), ['api', 'graphql', '-f']);
|
|
1691
|
+
const query = queryOf(calls[0]);
|
|
1692
|
+
assert.ok(query.includes('timelineItems(last: 10, itemTypes: [CROSS_REFERENCED_EVENT])'),
|
|
1693
|
+
'the window is the last ten cross-reference events');
|
|
1694
|
+
assert.equal(/timelineItems\(first:/.test(query), false, 'no oldest-first window survives');
|
|
1695
|
+
assert.equal((query.match(/first: 20/g) || []).length, 3,
|
|
1696
|
+
'the window change touches no search bound and adds no request');
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
test('marks the number of the most recent pull request, not the oldest', async () => {
|
|
1700
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1701
|
+
assigned: [
|
|
1702
|
+
// Chronological, as GraphQL answers: the oldest event first.
|
|
1703
|
+
issueNode(41, {
|
|
1704
|
+
timelineItems: {
|
|
1705
|
+
nodes: [
|
|
1706
|
+
{ source: { __typename: 'PullRequest', number: 70 } },
|
|
1707
|
+
{ source: { __typename: 'Issue', number: 9 } },
|
|
1708
|
+
{ source: { __typename: 'PullRequest', number: 71 } },
|
|
1709
|
+
{ source: { __typename: 'Issue', number: 10 } },
|
|
1710
|
+
{ source: { __typename: 'PullRequest', number: 35 } },
|
|
1711
|
+
],
|
|
1712
|
+
},
|
|
1713
|
+
}),
|
|
1714
|
+
],
|
|
1715
|
+
})));
|
|
1716
|
+
|
|
1717
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1718
|
+
assert.equal(result.ok, true);
|
|
1719
|
+
const row = result.buckets.assigned.issues[0];
|
|
1720
|
+
assert.equal(row.pullRequestNumber, 35,
|
|
1721
|
+
'the newest event that is a pull request supplies the mark, even behind an issue reference');
|
|
1722
|
+
assert.equal(row.hasPullRequest, true, 'several pull requests are still simply true');
|
|
1723
|
+
});
|
|
1724
|
+
|
|
1725
|
+
test('one pull request is its own newest, so it still marks its number', async () => {
|
|
1726
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1727
|
+
assigned: [issueNode(42, {
|
|
1728
|
+
timelineItems: {
|
|
1729
|
+
nodes: [
|
|
1730
|
+
{ source: { __typename: 'Issue', number: 4 } },
|
|
1731
|
+
{ source: { __typename: 'PullRequest', number: 69 } },
|
|
1732
|
+
],
|
|
1733
|
+
},
|
|
1734
|
+
})],
|
|
1735
|
+
})));
|
|
1736
|
+
|
|
1737
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1738
|
+
assert.equal(result.ok, true);
|
|
1739
|
+
const row = result.buckets.assigned.issues[0];
|
|
1740
|
+
assert.equal(row.pullRequestNumber, 69, 'the previous single-pull-request behaviour still holds');
|
|
1741
|
+
assert.equal(row.hasPullRequest, true);
|
|
1742
|
+
});
|
|
1743
|
+
|
|
1744
|
+
test('no pull request keeps the mark off: null and false', async () => {
|
|
1745
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1746
|
+
assigned: [
|
|
1747
|
+
issueNode(43, { timelineItems: { nodes: [] } }),
|
|
1748
|
+
issueNode(44, {
|
|
1749
|
+
timelineItems: {
|
|
1750
|
+
nodes: [
|
|
1751
|
+
{ source: { __typename: 'Issue', number: 5 } },
|
|
1752
|
+
{ source: { __typename: 'Issue', number: 6 } },
|
|
1753
|
+
],
|
|
1754
|
+
},
|
|
1755
|
+
}),
|
|
1756
|
+
issueNode(45, { timelineItems: undefined }),
|
|
1757
|
+
],
|
|
1758
|
+
})));
|
|
1759
|
+
|
|
1760
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1761
|
+
assert.equal(result.ok, true);
|
|
1762
|
+
assert.deepEqual(
|
|
1763
|
+
result.buckets.assigned.issues.map((row) => row.pullRequestNumber),
|
|
1764
|
+
[null, null, null],
|
|
1765
|
+
'an issue cross reference or no timeline is no number at all',
|
|
1766
|
+
);
|
|
1767
|
+
assert.deepEqual(
|
|
1768
|
+
result.buckets.assigned.issues.map((row) => row.hasPullRequest),
|
|
1769
|
+
[false, false, false],
|
|
1770
|
+
'and no marked row either',
|
|
1771
|
+
);
|
|
1772
|
+
});
|
|
1773
|
+
|
|
1774
|
+
test('a malformed event never throws and never becomes a number', async () => {
|
|
1775
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1776
|
+
assigned: [
|
|
1777
|
+
issueNode(46, {
|
|
1778
|
+
timelineItems: {
|
|
1779
|
+
nodes: [
|
|
1780
|
+
null,
|
|
1781
|
+
'nope',
|
|
1782
|
+
42,
|
|
1783
|
+
{},
|
|
1784
|
+
{ source: null },
|
|
1785
|
+
{ source: 'PullRequest' },
|
|
1786
|
+
{ source: { __typename: 'PullRequest' } },
|
|
1787
|
+
{ source: { __typename: 'PullRequest', number: 'x' } },
|
|
1788
|
+
{ source: { __typename: 'PullRequest', number: 0 } },
|
|
1789
|
+
{ source: { __typename: 'PullRequest', number: -3 } },
|
|
1790
|
+
],
|
|
1791
|
+
},
|
|
1792
|
+
}),
|
|
1793
|
+
issueNode(47, { timelineItems: { nodes: 'nope' } }),
|
|
1794
|
+
],
|
|
1795
|
+
})));
|
|
1796
|
+
|
|
1797
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1798
|
+
assert.equal(result.ok, true, 'a decoration never costs the caller its rows');
|
|
1799
|
+
assert.deepEqual(
|
|
1800
|
+
result.buckets.assigned.issues.map((row) => row.pullRequestNumber),
|
|
1801
|
+
[null, null],
|
|
1802
|
+
'a number the answer did not carry is no number, never a NaN or a #0',
|
|
1803
|
+
);
|
|
1804
|
+
assert.deepEqual(
|
|
1805
|
+
result.buckets.assigned.issues.map((row) => row.hasPullRequest),
|
|
1806
|
+
[true, false],
|
|
1807
|
+
'a pull-request source without a number is still a pull request',
|
|
1808
|
+
);
|
|
1809
|
+
});
|
|
1810
|
+
|
|
1811
|
+
// A newest pull request whose number the answer omitted is not a number: the
|
|
1812
|
+
// newest one the answer DID number is the newest mark available. `#0`/`#NaN`
|
|
1813
|
+
// never reaches a row.
|
|
1814
|
+
test('a numberless newest pull request yields the newest numbered one', async () => {
|
|
1815
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1816
|
+
assigned: [issueNode(48, {
|
|
1817
|
+
timelineItems: {
|
|
1818
|
+
nodes: [
|
|
1819
|
+
{ source: { __typename: 'PullRequest', number: 70 } },
|
|
1820
|
+
{ source: { __typename: 'PullRequest' } },
|
|
1821
|
+
],
|
|
1822
|
+
},
|
|
1823
|
+
})],
|
|
1824
|
+
})));
|
|
1825
|
+
|
|
1826
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1827
|
+
assert.equal(result.ok, true);
|
|
1828
|
+
assert.equal(result.buckets.assigned.issues[0].pullRequestNumber, 70);
|
|
1829
|
+
});
|
|
1830
|
+
|
|
1831
|
+
// T10 (S9): the rail's cached row IS the panel's first frame, so the assignees
|
|
1832
|
+
// the connect-shaped answer carries are normalized onto it exactly like the
|
|
1833
|
+
// detail read's `assignees` array.
|
|
1834
|
+
test('normalizes a connection-shaped assignee list onto the row', async () => {
|
|
1835
|
+
ghIssues.setGhRunner(async () => okJson(relatedJson({
|
|
1836
|
+
assigned: [
|
|
1837
|
+
issueNode(21, { assignees: { nodes: [{ login: 'ana' }, { login: 'beto' }] } }),
|
|
1838
|
+
issueNode(22),
|
|
1839
|
+
],
|
|
1840
|
+
})));
|
|
1841
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1842
|
+
assert.equal(result.ok, true);
|
|
1843
|
+
assert.deepEqual(result.buckets.assigned.issues[0].assignees, ['ana', 'beto'],
|
|
1844
|
+
'the row carries the assignees as logins');
|
|
1845
|
+
assert.deepEqual(result.buckets.assigned.issues[1].assignees, [],
|
|
1846
|
+
'a row the answer did not assign carries none, never undefined');
|
|
1847
|
+
});
|
|
1848
|
+
|
|
1849
|
+
test('every failure shape is { ok: false } and never a throw', async () => {
|
|
1850
|
+
const cases = [
|
|
1851
|
+
['a rejected child', () => { throw new Error('spawn gh ENOENT'); }],
|
|
1852
|
+
['a non-zero exit', () => ({ status: 1, stdout: '', stderr: 'HTTP 502: bad gateway', error: null })],
|
|
1853
|
+
['a GraphQL errors array', () => okJson(JSON.stringify({ errors: [{ message: 'bad query' }], data: {} }))],
|
|
1854
|
+
['an unparseable body', () => okJson('not json')],
|
|
1855
|
+
['a missing alias', () => okJson(JSON.stringify({
|
|
1856
|
+
data: {
|
|
1857
|
+
mine: { issueCount: 0, nodes: [] },
|
|
1858
|
+
assigned: { issueCount: 0, nodes: [] },
|
|
1859
|
+
},
|
|
1860
|
+
}))],
|
|
1861
|
+
['non-array nodes', () => okJson(JSON.stringify({
|
|
1862
|
+
data: {
|
|
1863
|
+
mine: { issueCount: 0, nodes: 'nope' },
|
|
1864
|
+
assigned: { issueCount: 0, nodes: [] },
|
|
1865
|
+
involved: { issueCount: 0, nodes: [] },
|
|
1866
|
+
},
|
|
1867
|
+
}))],
|
|
1868
|
+
['an issue without a number', () => okJson(relatedJson({ mine: [{ title: 'no number' }] }))],
|
|
1869
|
+
];
|
|
1870
|
+
for (const [name, answer] of cases) {
|
|
1871
|
+
ghIssues.setGhRunner(async () => answer());
|
|
1872
|
+
const result = await ghIssues.listRelatedIssues({ first: 20 }, { scope: IDENTITY });
|
|
1873
|
+
assert.equal(result.ok, false, `${name}: fails closed`);
|
|
1874
|
+
assert.equal(typeof result.error, 'string', `${name}: an error names the failure`);
|
|
1875
|
+
}
|
|
1876
|
+
});
|
|
1877
|
+
|
|
1878
|
+
test('an invalid first is refused without a child', async () => {
|
|
1879
|
+
const calls = [];
|
|
1880
|
+
ghIssues.setGhRunner(async (bin, argv) => {
|
|
1881
|
+
calls.push({ bin, argv: argv.slice() });
|
|
1882
|
+
return okJson(relatedJson());
|
|
1883
|
+
});
|
|
1884
|
+
|
|
1885
|
+
for (const first of [0, 101, -1, 20.5, '20', null, undefined]) {
|
|
1886
|
+
const result = await ghIssues.listRelatedIssues({ first }, { scope: IDENTITY });
|
|
1887
|
+
assert.equal(result.ok, false, `first=${JSON.stringify(first)} is refused`);
|
|
1888
|
+
assert.match(result.error, /invalid first/);
|
|
1889
|
+
}
|
|
1890
|
+
assert.equal(calls.length, 0, 'validation runs before any child process');
|
|
1891
|
+
});
|
|
1892
|
+
});
|
|
@@ -37,7 +37,7 @@ const FULL = {
|
|
|
37
37
|
commentsCount: 2,
|
|
38
38
|
reactions: { plusOne: 3 },
|
|
39
39
|
projects: [{ title: 'Roadmap' }],
|
|
40
|
-
|
|
40
|
+
linkedPullRequests: [69, 77],
|
|
41
41
|
body: 'the body',
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -54,7 +54,7 @@ describe('issue preview formatter (S16)', () => {
|
|
|
54
54
|
assert.match(text, /by octo · created 4d ago · updated 3d ago/);
|
|
55
55
|
assert.match(text, /👍 3 · 2 comments/);
|
|
56
56
|
assert.match(text, /projects: Roadmap/);
|
|
57
|
-
assert.match(text, /linked PRs:
|
|
57
|
+
assert.match(text, /linked PRs: #69, #77/, 'every linked PR is named by number, never counted');
|
|
58
58
|
assert.match(text, /the body/);
|
|
59
59
|
assert.match(text, /─ ana · 2d ago ─/);
|
|
60
60
|
assert.match(text, /first comment/);
|
|
@@ -64,7 +64,7 @@ describe('issue preview formatter (S16)', () => {
|
|
|
64
64
|
|
|
65
65
|
test('omits empty optional metadata instead of printing a zero or "none"', () => {
|
|
66
66
|
const text = render(
|
|
67
|
-
{ ...FULL, assignees: [], projects: [],
|
|
67
|
+
{ ...FULL, assignees: [], projects: [], linkedPullRequests: [], commentsCount: 0, reactions: { plusOne: 0 } },
|
|
68
68
|
[],
|
|
69
69
|
);
|
|
70
70
|
assert.doesNotMatch(text, /assignees:/);
|
|
@@ -75,9 +75,24 @@ describe('issue preview formatter (S16)', () => {
|
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
test('a pending read paints the known fields and names the read', () => {
|
|
78
|
-
const text = render(
|
|
78
|
+
const text = render(
|
|
79
|
+
{
|
|
80
|
+
number: 12,
|
|
81
|
+
title: 'issue title 12',
|
|
82
|
+
author: 'octo',
|
|
83
|
+
labels: [{ name: 'bug' }],
|
|
84
|
+
assignees: [{ login: 'ana' }],
|
|
85
|
+
},
|
|
86
|
+
[],
|
|
87
|
+
{ pending: true },
|
|
88
|
+
);
|
|
79
89
|
assert.match(text, /#12 issue title 12/);
|
|
80
90
|
assert.match(text, /labels: bug/);
|
|
91
|
+
assert.match(text, /assignees: ana/);
|
|
92
|
+
// S9 (T10): the row the rail caches already names its author, so the first
|
|
93
|
+
// frame of a numbered open carries it instead of withholding it until the
|
|
94
|
+
// detail read lands.
|
|
95
|
+
assert.match(text, /by octo/);
|
|
81
96
|
assert.match(text, /loading…/);
|
|
82
97
|
assert.doesNotMatch(text, /the body|no description|\(end of issue\)/);
|
|
83
98
|
});
|
|
@@ -204,12 +219,34 @@ describe('the preview title follows the shared palette (S13)', () => {
|
|
|
204
219
|
assert.ok(!calls.some((call) => call.text.startsWith('👍')), 'the counter stays plain text');
|
|
205
220
|
});
|
|
206
221
|
|
|
207
|
-
test('a
|
|
222
|
+
test('a metadata read that lost a relation paints no note about it, and the rest still renders', () => {
|
|
223
|
+
const text = render({ ...FULL, projects: [], unavailable: ['projects'] }, []);
|
|
224
|
+
assert.doesNotMatch(text, /metadata/i, 'the pane never announces a lost relation');
|
|
225
|
+
assert.doesNotMatch(text, /read:project|scope/i, 'the scope behind the failure never leaks');
|
|
226
|
+
assert.doesNotMatch(text, /projects:/, 'a relation that could not be read adds no row');
|
|
227
|
+
assert.match(text, /linked PRs: #69, #77/, 'the relations that did resolve still render');
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test('a whole failed metadata read paints no note either', () => {
|
|
231
|
+
const text = render({ ...FULL, metadataError: 'boom', unavailable: ['linked PRs', 'projects'] }, []);
|
|
232
|
+
assert.doesNotMatch(text, /metadata|boom/i);
|
|
233
|
+
assert.match(text, /assignees: ana, beto/, 'the facts the row already had still render');
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test('an absent list and a truncated list stay honest', () => {
|
|
237
|
+
assert.doesNotMatch(render({ ...FULL, linkedPullRequests: [] }, []), /linked PRs:/);
|
|
238
|
+
assert.match(
|
|
239
|
+
render({ ...FULL, linkedPullRequests: [69], linkedPullRequestsTruncated: true }, []),
|
|
240
|
+
/linked PRs: #69, …/,
|
|
241
|
+
'a capped page is marked as truncated instead of passing for the whole list',
|
|
242
|
+
);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
test('a closed issue keeps its own role and an unreadable read paints no note', () => {
|
|
208
246
|
const { calls } = renderSpy({ ...FULL, state: 'closed', metadataError: 'boom' }, []);
|
|
209
247
|
assert.ok(calls.some((call) => call.role === 'muted' && call.text === '[closed]'),
|
|
210
248
|
'a closed state is muted, not the title role');
|
|
211
|
-
assert.ok(calls.some((call) => call.
|
|
212
|
-
'the unreadable-metadata note stays muted');
|
|
249
|
+
assert.ok(!calls.some((call) => /metadata/i.test(call.text)), 'no metadata note is painted in any role');
|
|
213
250
|
assert.ok(calls.some((call) => call.role === 'muted' && call.text === 'loading…') === false,
|
|
214
251
|
'a ready read paints no pending word');
|
|
215
252
|
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// T9 (S10): the `bash` command classifier behind the issues rail's forced
|
|
3
|
+
// refresh.
|
|
4
|
+
//
|
|
5
|
+
// Contract under test, through the public surface only:
|
|
6
|
+
// - a `bash` command string that mutates a GitHub issue or pull request answers
|
|
7
|
+
// `true`: the `gh issue` verbs create/edit/close/reopen/comment/delete/
|
|
8
|
+
// transfer/develop/lock/unlock, the same for `gh pr` plus merge/review/ready,
|
|
9
|
+
// and a `gh api` call with a POST/PATCH/PUT/DELETE method (spelled `-X`,
|
|
10
|
+
// `-XPOST`, `--method` or `--method=`) or the field flags that make `gh` POST;
|
|
11
|
+
// - nothing else answers `true`: read-only verbs (`list`, `view`, `status`,
|
|
12
|
+
// `diff`, `checks`), a bare `gh api` GET, `gh repo view`, plain `git`, and a
|
|
13
|
+
// command that only MENTIONS a mutation inside an argument;
|
|
14
|
+
// - every segment of a compound command counts (`&&`, `||`, `|`, `;`, `&` and
|
|
15
|
+
// newlines), and a leading `env`/`VAR=value`/absolute path spelling still
|
|
16
|
+
// names the same `gh` binary;
|
|
17
|
+
// - it is a pure decision over text: no child process, no shell, and it never
|
|
18
|
+
// throws — a non-string, an empty string or a command the scanner cannot read
|
|
19
|
+
// is simply `false`.
|
|
20
|
+
const { test } = require('node:test');
|
|
21
|
+
const assert = require('node:assert/strict');
|
|
22
|
+
const { bashMutatesIssuesOrPullRequests } = require('../lib/issues-bash-mutation.js');
|
|
23
|
+
|
|
24
|
+
const MUTATES = [
|
|
25
|
+
['gh issue create --title "Broken login" --body "..."', 'gh issue create'],
|
|
26
|
+
['gh issue edit 12 --add-label bug', 'gh issue edit'],
|
|
27
|
+
['gh issue close 12', 'gh issue close'],
|
|
28
|
+
['gh issue reopen 12', 'gh issue reopen'],
|
|
29
|
+
['gh issue comment 12 --body "fixed in 1.2"', 'gh issue comment'],
|
|
30
|
+
['gh issue delete 12 --yes', 'gh issue delete'],
|
|
31
|
+
['gh issue transfer 12 other/repo', 'gh issue transfer'],
|
|
32
|
+
['gh issue develop 12 --checkout', 'gh issue develop'],
|
|
33
|
+
['gh issue lock 12', 'gh issue lock'],
|
|
34
|
+
['gh issue unlock 12', 'gh issue unlock'],
|
|
35
|
+
['gh pr create --title "Feature" --body "..."', 'gh pr create'],
|
|
36
|
+
['gh pr edit 3 --add-reviewer me', 'gh pr edit'],
|
|
37
|
+
['gh pr close 3', 'gh pr close'],
|
|
38
|
+
['gh pr reopen 3', 'gh pr reopen'],
|
|
39
|
+
['gh pr merge 3 --squash', 'gh pr merge'],
|
|
40
|
+
['gh pr comment 3 --body "lgtm"', 'gh pr comment'],
|
|
41
|
+
['gh pr review 3 --approve', 'gh pr review'],
|
|
42
|
+
['gh pr ready 3', 'gh pr ready'],
|
|
43
|
+
['gh pr lock 3', 'gh pr lock'],
|
|
44
|
+
['gh pr unlock 3', 'gh pr unlock'],
|
|
45
|
+
['gh api repos/me/project/issues -X POST -f title=one', 'gh api -X POST'],
|
|
46
|
+
['gh api repos/me/project/issues/12 -X PATCH -f state=closed', 'gh api -X PATCH'],
|
|
47
|
+
['gh api --method PUT repos/me/project/issues/12', 'gh api --method PUT'],
|
|
48
|
+
['gh api --method=DELETE repos/me/project/issues/12', 'gh api --method=DELETE'],
|
|
49
|
+
['gh api -XDELETE repos/me/project/issues/12', 'gh api -XDELETE'],
|
|
50
|
+
['gh api repos/me/project/issues/12/comments -f body=hi', 'gh api -f implies POST'],
|
|
51
|
+
['gh api graphql -f query=@mutate.graphql', 'gh api graphql with a field'],
|
|
52
|
+
['git checkout main && gh issue close 12', 'a compound command'],
|
|
53
|
+
['gh issue list; gh pr merge 3', 'the second segment'],
|
|
54
|
+
['echo preparing\ngh issue reopen 12', 'a newline-separated segment'],
|
|
55
|
+
['(gh pr close 3)', 'a subshell segment'],
|
|
56
|
+
['/usr/local/bin/gh issue close 12', 'an absolute gh path'],
|
|
57
|
+
['env GITHUB_TOKEN=x gh issue close 12', 'an env prefix'],
|
|
58
|
+
['GITHUB_TOKEN=x gh pr merge 3', 'a VAR=value prefix'],
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const READ_ONLY = [
|
|
62
|
+
['', 'the empty command'],
|
|
63
|
+
[' \n\t ', 'whitespace only'],
|
|
64
|
+
['git status', 'plain git'],
|
|
65
|
+
['git commit -m "cleanup"', 'a commit'],
|
|
66
|
+
['gh issue list --limit 20', 'gh issue list'],
|
|
67
|
+
['gh issue view 12', 'gh issue view'],
|
|
68
|
+
['gh issue status', 'gh issue status'],
|
|
69
|
+
['gh pr list', 'gh pr list'],
|
|
70
|
+
['gh pr view 3', 'gh pr view'],
|
|
71
|
+
['gh pr diff 3', 'gh pr diff'],
|
|
72
|
+
['gh pr checks 3', 'gh pr checks'],
|
|
73
|
+
['gh pr status', 'gh pr status'],
|
|
74
|
+
['gh api repos/me/project/issues', 'a bare gh api GET'],
|
|
75
|
+
['gh api -X GET repos/me/project/issues', 'an explicit GET'],
|
|
76
|
+
['gh api --method HEAD repos/me/project', 'an explicit HEAD'],
|
|
77
|
+
['gh repo view --json nameWithOwner', 'gh repo view'],
|
|
78
|
+
['gh auth status', 'gh auth status'],
|
|
79
|
+
['echo "gh issue close 12"', 'a mutation mentioned inside an argument'],
|
|
80
|
+
['git commit -m "gh pr merge 3"', 'a mutation inside a commit message'],
|
|
81
|
+
['grep -rn "gh pr merge" docs/', 'a mutation in a search pattern'],
|
|
82
|
+
['echo gh pr close', 'a bare mention after echo'],
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
test('S10 (T9): every mutating gh verb answers true', () => {
|
|
86
|
+
for (const [command, label] of MUTATES) {
|
|
87
|
+
assert.equal(bashMutatesIssuesOrPullRequests(command), true, `${label}: ${JSON.stringify(command)}`);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('S10 (T9): nothing else answers true', () => {
|
|
92
|
+
for (const [command, label] of READ_ONLY) {
|
|
93
|
+
assert.equal(bashMutatesIssuesOrPullRequests(command), false, `${label}: ${JSON.stringify(command)}`);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('S10 (T9): a value that is not a command is false, never a throw', () => {
|
|
98
|
+
for (const value of [null, undefined, 42, {}, [], true, { command: 'gh issue close 12' }]) {
|
|
99
|
+
assert.equal(bashMutatesIssuesOrPullRequests(value), false, `answered true for ${JSON.stringify(value)}`);
|
|
100
|
+
}
|
|
101
|
+
});
|