@rt-tools/agent-kit 0.26.0 → 0.28.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/assets/agents/cargo-writer.md +54 -0
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epic-plan.github.mjs +86 -0
- package/assets/checks/board-epics.github.mjs +217 -69
- package/assets/checks/board-long-work.github.mjs +5 -1
- package/assets/checks/board-pull-state.github.mjs +163 -0
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board.github.mjs +8 -91
- package/assets/checks/check-board.github.mjs +25 -165
- package/assets/checks/check-glossary.mjs +10 -2
- package/assets/checks/check-lib-layers.mjs +24 -1
- package/assets/checks/check-prose-style.mjs +19 -3
- package/assets/checks/check-reuse.mjs +26 -2
- package/assets/checks/check-schema-drift.mjs +19 -3
- package/assets/checks/check-specs.mjs +8 -1
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +2 -2
- package/assets/checks/lib-common.mjs +46 -0
- package/assets/checks/lib-manifests.mjs +18 -13
- package/assets/checks/rt-kit-checks.config.mjs +19 -0
- package/assets/checks/signals.mjs +39 -5
- package/assets/checks/spec-anchors.mjs +48 -4
- package/assets/checks/spec-common.mjs +40 -6
- package/assets/checks/spec-contract.mjs +33 -7
- package/assets/checks/spec-scenarios.mjs +24 -1
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +237 -6
- package/assets/commands/night.md +115 -0
- package/assets/defaults/gate-map.sh +20 -5
- package/assets/defaults/project.sh +13 -0
- package/assets/defaults/turn-map.md +3 -1
- package/assets/docs/GLOSSARY.md +22 -22
- package/assets/hooks/browser-device-id.sh +4 -0
- package/assets/hooks/browser-guard-device-id.sh +4 -0
- package/assets/hooks/commit-msg.sh +3 -0
- package/assets/hooks/dev-server-guard.sh +64 -31
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +10 -10
- package/assets/hooks/git-guard-delivery-conflict.sh +56 -1
- package/assets/hooks/git-guard-delivery-draft.sh +10 -6
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-signature.sh +32 -2
- package/assets/hooks/git-guard-delivery-tree.sh +50 -0
- package/assets/hooks/git-guard-delivery.sh +71 -27
- package/assets/hooks/git-guard-discard.sh +144 -0
- package/assets/hooks/git-guard-push-tests.sh +36 -16
- package/assets/hooks/handoff-entry-guard.sh +20 -2
- package/assets/hooks/prose-style-guard.sh +31 -8
- package/assets/hooks/qa-dataid-guard.sh +33 -11
- package/assets/hooks/reuse-first-guard.sh +29 -4
- package/assets/hooks/rule-article.sh +3 -0
- package/assets/hooks/rule-source-guard.sh +17 -2
- package/assets/hooks/skill-gate-layers.sh +4 -0
- package/assets/hooks/skill-gate.sh +7 -0
- package/assets/hooks/skill-loaded.sh +4 -0
- package/assets/hooks/sql-guard-parse.sh +3 -0
- package/assets/hooks/sql-guard-request.sh +3 -0
- package/assets/hooks/sql-guard-target.sh +3 -0
- package/assets/hooks/sql-guard-write.sh +21 -2
- package/assets/hooks/stand-login-guard.sh +3 -0
- package/assets/hooks/turn-exit-guard.sh +55 -67
- package/assets/hooks/turn-exit-patterns.sh +28 -1
- package/assets/hooks/turn-exit-verdict.sh +84 -0
- package/assets/hooks/utf8.sh +3 -0
- package/assets/hooks/waiting-turn-guard.sh +11 -1
- package/assets/hooks/write-targets.sh +3 -0
- package/assets/laws/delivery.md +37 -7
- package/assets/laws/verifiability.md +22 -4
- package/assets/patterns/git-workflow-commit.azure.md +1 -1
- package/assets/patterns/git-workflow-commit.github.md +9 -2
- package/assets/patterns/git-workflow-commit.gitlab.md +1 -1
- package/assets/patterns/git-workflow-merge.md +8 -5
- package/assets/patterns/git-workflow-pr.azure.md +1 -1
- package/assets/patterns/git-workflow-pr.github.md +44 -18
- package/assets/patterns/git-workflow-pr.gitlab.md +1 -1
- package/assets/patterns/git-workflow-stack.md +32 -9
- package/assets/patterns/status-report-table.github.md +11 -0
- package/assets/patterns/task-flow-close.md +96 -90
- package/assets/patterns/task-flow-start.md +40 -26
- package/assets/patterns/ts-procedure.md +6 -0
- package/assets/pitfalls/agent-kit.md +19 -0
- package/assets/pitfalls/git-workflow.github.md +44 -0
- package/assets/pitfalls/task-flow.md +25 -23
- package/assets/rules/autonomous-work.md +15 -3
- package/assets/rules/browser-verification.md +8 -0
- package/assets/rules/deploy-flow.github.md +6 -0
- package/assets/rules/doc-style.md +13 -4
- package/assets/rules/git-workflow.azure.md +10 -0
- package/assets/rules/git-workflow.github.md +144 -126
- package/assets/rules/git-workflow.gitlab.md +10 -0
- package/assets/rules/lib-layers.md +11 -0
- package/assets/rules/spec-driven.md +17 -1
- package/assets/rules/status-report.md +7 -0
- package/assets/rules/task-flow.md +78 -54
- package/assets/rules/testing.md +7 -0
- package/assets/rules/turn-conduct.md +30 -3
- package/assets/samples/tasks/_template/plan.md +4 -1
- package/assets/skills/agent-kit.md +40 -25
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +9 -2
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo-prose.d.ts +41 -0
- package/lib/cargo-prose.d.ts.map +1 -0
- package/lib/cargo-prose.js +88 -0
- package/lib/cargo-prose.js.map +1 -0
- package/lib/cargo.d.ts +12 -1
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +8 -2
- package/lib/cargo.js.map +1 -1
- package/lib/commands.d.ts +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +59 -2
- package/lib/commands.js.map +1 -1
- package/lib/fate.d.ts +29 -0
- package/lib/fate.d.ts.map +1 -0
- package/lib/fate.js +147 -0
- package/lib/fate.js.map +1 -0
- package/lib/hooks-map.d.ts +5 -0
- package/lib/hooks-map.d.ts.map +1 -1
- package/lib/hooks-map.js +9 -3
- package/lib/hooks-map.js.map +1 -1
- package/lib/override-marks.d.ts +7 -0
- package/lib/override-marks.d.ts.map +1 -1
- package/lib/override-marks.js +14 -0
- package/lib/override-marks.js.map +1 -1
- package/lib/plan.d.ts +2 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +8 -0
- package/lib/plan.js.map +1 -1
- package/lib/proposals.d.ts +25 -0
- package/lib/proposals.d.ts.map +1 -1
- package/lib/proposals.js +43 -1
- package/lib/proposals.js.map +1 -1
- package/lib/ship.d.ts +29 -2
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +34 -0
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.fixture.d.ts +8 -1
- package/lib/shipment.fixture.d.ts.map +1 -1
- package/lib/shipment.fixture.js +9 -0
- package/lib/shipment.fixture.js.map +1 -1
- package/lib/shipment.js +40 -14
- package/lib/shipment.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.28.0.tgz +0 -0
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cargo-writer
|
|
3
|
+
description: Writes a proposal or an incident analysis for the intake in plain words, into the ready-made shape. Returns the text and writes no files. Use before a record goes into the proposals file or into the analyses directory.
|
|
4
|
+
tools: Read, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You write a cargo record — a proposal on the rules layer or an incident analysis. It is read by a
|
|
8
|
+
person, and you write it in **their language**, the one the request came in: the rules layer is
|
|
9
|
+
written in English, and a record for the intake goes in the language of whoever reads it.
|
|
10
|
+
|
|
11
|
+
The record leaves for a foreign repository whole. Its reader knows neither this task, nor this
|
|
12
|
+
tree, nor the words the executor thought in that hour.
|
|
13
|
+
|
|
14
|
+
## What you receive
|
|
15
|
+
|
|
16
|
+
- The facts: what went wrong, where, what was already read, what caught it.
|
|
17
|
+
- The resource the record is about, and the lines of it that stand closest.
|
|
18
|
+
- For a proposal — the ready-made text of the edit, if the caller has one.
|
|
19
|
+
|
|
20
|
+
## The shape
|
|
21
|
+
|
|
22
|
+
The shape is set by the templates `proposal.md` and `postmortem.md`, and you fill it as it
|
|
23
|
+
stands. A shape of your own gets the block refused: the machine looks for the four lines of a
|
|
24
|
+
proposal and for the quote in the third of them.
|
|
25
|
+
|
|
26
|
+
- **The quote of the closest statement is copied from the resource, letter for letter.** A
|
|
27
|
+
retold one is not found, and the block does not leave. There is nothing close — write exactly
|
|
28
|
+
the word the template names.
|
|
29
|
+
- **The heading names the address and the resource by the package identifier**, not by a path in
|
|
30
|
+
this tree.
|
|
31
|
+
- **The name of an analysis names the miss, not the task.** The task closes, the miss repeats on
|
|
32
|
+
another.
|
|
33
|
+
|
|
34
|
+
## How you write
|
|
35
|
+
|
|
36
|
+
- The subject names whoever acts: "the guard checks", not "a check is carried out".
|
|
37
|
+
- One sentence — one thought. The limit is forty words, and the wording check counts them.
|
|
38
|
+
- An ordinary word beats a long one. A word of the rules layer is explained where it first
|
|
39
|
+
stands, or replaced.
|
|
40
|
+
- The main thing first: the reader quits halfway and must quit knowing it.
|
|
41
|
+
- The mechanism, not an appraisal. "Was inattentive" yields no rule; "took the answer of a
|
|
42
|
+
neighbouring command for its own" does.
|
|
43
|
+
|
|
44
|
+
The text you return is judged by the wording check before the send. A record with findings does
|
|
45
|
+
not leave, so you read your own text once more before answering.
|
|
46
|
+
|
|
47
|
+
## What you do not do
|
|
48
|
+
|
|
49
|
+
- You do not edit files. You return the text; whoever called you puts it where it belongs.
|
|
50
|
+
- You do not invent facts. Something is missing — you name what, instead of filling the gap.
|
|
51
|
+
- You do not judge whether the proposal is right by substance: that is compared against the
|
|
52
|
+
agreement by another role.
|
|
53
|
+
- You do not name another tree, its domains or its paths — neither in the text nor in an example.
|
|
54
|
+
- You do not soften. A miss described as a difficulty produces no edit of the rules layer.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The declaration by which a task names its epic.
|
|
3
|
+
*
|
|
4
|
+
* A file of its own because three readers need it at once — the queue audit, the creating command
|
|
5
|
+
* and the delivery guard — and each of them lies in its own layer. Read in two places, the same
|
|
6
|
+
* declaration diverges silently: one side demands a shape the other does not see, and the task
|
|
7
|
+
* then belongs to an epic for one reader and to none for the other.
|
|
8
|
+
*/
|
|
9
|
+
import { CONFIG } from './rt-kit-checks.config.mjs';
|
|
10
|
+
|
|
11
|
+
const TASK_KEY = CONFIG.board?.taskKey ?? '';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The epic a task body declares itself under — or `undefined` where nothing is declared. With a
|
|
15
|
+
* number given, it answers whether that very epic is declared.
|
|
16
|
+
*
|
|
17
|
+
* Belonging is declared by the word about the task standing right before the word about the epic —
|
|
18
|
+
* the very shape the creating command writes. Read by a bare mention of the number, every task
|
|
19
|
+
* that explains something about an epic got a false line: the number stands there in the
|
|
20
|
+
* reasoning, in a quoted refusal, in the list of what the work does not do.
|
|
21
|
+
*
|
|
22
|
+
* The task state carries the answer as a field of its own: the delivery guard judges the base of a
|
|
23
|
+
* branch by it, and it has no other road to the epic — the queue holds neither branches nor
|
|
24
|
+
* kinship of cards.
|
|
25
|
+
*/
|
|
26
|
+
export function declaredEpicOf(body, number = null) {
|
|
27
|
+
const named = String(body ?? '').match(new RegExp(`задач[аи]\\s+эпика?\\s+(?:#|${TASK_KEY}-)(\\d+)`, 'i'))?.[1];
|
|
28
|
+
return number === null ? named : named !== undefined && Number(named) === number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plan of an epic named by its own card: which of the paths in the body is the plan.
|
|
3
|
+
*
|
|
4
|
+
* A file of its own because two readers need it at once — the queue audit and the creating command
|
|
5
|
+
* — and they lie in different layers. Read in two places, the choice diverges silently: the audit
|
|
6
|
+
* takes the document that carries the makeup, while the command took the first path in the body,
|
|
7
|
+
* and a card that names a law before its plan then wrote the law into every task of the epic as its
|
|
8
|
+
* plan. Both sides answered as usual, and the miss showed only from a third side — by reading a
|
|
9
|
+
* created task.
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
+
import { join } from 'node:path';
|
|
13
|
+
|
|
14
|
+
import { ROOT } from './rt-kit-checks.config.mjs';
|
|
15
|
+
|
|
16
|
+
/** A path counts as a spelling with a directory: a bare file name occurs in the body in prose. */
|
|
17
|
+
const PATH_IN_BODY = /(?:^|[\s(`])([\w.-]+(?:\/[\w.-]+)+\.md)/g;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The rows of the epic makeup — those standing in the table with the task column.
|
|
21
|
+
*
|
|
22
|
+
* The epic plan holds other tables too: the sources of findings, the makeup of families, the count
|
|
23
|
+
* of items. Numbers taken from the whole text, and even from all the tables, would make an epic
|
|
24
|
+
* task out of everything it mentioned — the previous epic its findings grew from, a review, a task
|
|
25
|
+
* of a neighbouring tree.
|
|
26
|
+
*/
|
|
27
|
+
export function planRows(plan) {
|
|
28
|
+
const rows = [];
|
|
29
|
+
let inside = false;
|
|
30
|
+
for (const line of plan.split('\n')) {
|
|
31
|
+
const isRow = line.trimStart().startsWith('|');
|
|
32
|
+
if (!isRow) {
|
|
33
|
+
inside = false;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (!inside) {
|
|
37
|
+
// The column has two names, English and the owner's: a tree translates its plans one at
|
|
38
|
+
// a time, and one name would take the untranslated epics out of the check silently. A
|
|
39
|
+
// word boundary is no good here either: `\b` knows only Latin letters and never matches
|
|
40
|
+
// Cyrillic — the check would stay silent on any plan.
|
|
41
|
+
inside = /\|[^|]*(?:Task|Задача)/.test(line);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
rows.push(line);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return rows.join('\n');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The plan of an epic named by its own card, and the reason there is none.
|
|
52
|
+
*
|
|
53
|
+
* The plan is the document that carries the makeup, not the first path in the body. A card names
|
|
54
|
+
* its decision next to its plan, and the decision has no table of tasks: read as the plan, it made
|
|
55
|
+
* the makeup empty and every open task of the epic read as not belonging to it — fourteen false
|
|
56
|
+
* lines at once, and the true ones drowned among them.
|
|
57
|
+
*/
|
|
58
|
+
export function planPathOf(body, { makeupRequired = true } = {}) {
|
|
59
|
+
const named = [...String(body ?? '').matchAll(PATH_IN_BODY)].map((match) => match[1]);
|
|
60
|
+
if (named.length === 0) {
|
|
61
|
+
return { path: null, why: 'the epic card names no path to the plan — there is nowhere to read what the epic holds' };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const onDisk = named.filter((path) => existsSync(join(ROOT, path)));
|
|
65
|
+
if (onDisk.length === 0) {
|
|
66
|
+
return { path: null, why: `the epic plan «${named[0]}» is not on disk — the card points into emptiness` };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const carrying = onDisk.find((path) => planRows(readFileSync(join(ROOT, path), 'utf8')) !== '') ?? null;
|
|
70
|
+
if (carrying !== null) {
|
|
71
|
+
return { path: carrying, why: '' };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// The makeup is not demanded of the creating command: it creates the tasks of an epic, and the
|
|
75
|
+
// numbers land in the plan by the same edit — that is, after. Demanded here, the requirement
|
|
76
|
+
// would refuse the very first task of every epic, and there would be no way to create one at
|
|
77
|
+
// all. The audit runs later and demands it: by its minute the numbers stand in the plan.
|
|
78
|
+
if (!makeupRequired) {
|
|
79
|
+
return { path: onDisk[0], why: '' };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
path: null,
|
|
84
|
+
why: `none of the documents the card names carries the makeup of the epic — «${onDisk.join('», «')}». The makeup is a table with a task column`,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -2,62 +2,27 @@
|
|
|
2
2
|
* The link between a task and an epic. Lives in a file of its own: the work queue audit stands at
|
|
3
3
|
* the length limit even without it, and these two checks are read separately.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { declaredEpicOf } from './board-epic-link.mjs';
|
|
9
|
+
import { planPathOf, planRows } from './board-epic-plan.mjs';
|
|
10
|
+
import { ghJson, numberFromTitle, OfflineError, OWNER, REPO, TASK_KEY } from './board.mjs';
|
|
9
11
|
import { CONFIG, ROOT } from './rt-kit-checks.config.mjs';
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* The label of an epic card. Not named — the link is not judged: there would be nothing left to
|
|
13
15
|
* tell an epic card from an ordinary task by.
|
|
14
16
|
*/
|
|
15
|
-
|
|
17
|
+
// Чтение объявления переехало в свой модуль, а звали его отсюда: имя оставлено на прежнем месте,
|
|
18
|
+
// чтобы соседям не пришлось знать о переезде. Тем же ходом переехал выбор документа замысла — его
|
|
19
|
+
// читает и команда заведения задачи.
|
|
20
|
+
export { declaredEpicOf, planPathOf, planRows };
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
* The rows of the epic makeup — those standing in the table with the task column.
|
|
19
|
-
*
|
|
20
|
-
* The epic plan holds other tables too: the sources of findings, the makeup of families, the count
|
|
21
|
-
* of items. Numbers taken from the whole text, and even from all the tables, would make an epic
|
|
22
|
-
* task out of everything it mentioned — the previous epic its findings grew from, a review, a task
|
|
23
|
-
* of a neighbouring tree.
|
|
24
|
-
*/
|
|
25
|
-
function planRows(plan) {
|
|
26
|
-
const rows = [];
|
|
27
|
-
let inside = false;
|
|
28
|
-
for (const line of plan.split('\n')) {
|
|
29
|
-
const isRow = line.trimStart().startsWith('|');
|
|
30
|
-
if (!isRow) {
|
|
31
|
-
inside = false;
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (!inside) {
|
|
35
|
-
// The column has two names, English and the owner's: a tree translates its plans one at
|
|
36
|
-
// a time, and one name would take the untranslated epics out of the check silently. A
|
|
37
|
-
// word boundary is no good here either: `\b` knows only Latin letters and never matches
|
|
38
|
-
// Cyrillic — the check would stay silent on any plan.
|
|
39
|
-
inside = /\|[^|]*(?:Task|Задача)/.test(line);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
rows.push(line);
|
|
43
|
-
}
|
|
44
|
-
return rows.join('\n');
|
|
45
|
-
}
|
|
22
|
+
const EPIC_LABEL = CONFIG.board?.epicLabel ?? '';
|
|
46
23
|
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
* number given, it answers whether that very epic is declared.
|
|
50
|
-
*
|
|
51
|
-
* Belonging is declared by a word about the task standing right before the word about the epic —
|
|
52
|
-
* the very shape the refusal dictates. Read by a bare mention of the number, every task that
|
|
53
|
-
* explains something about an epic got a false line: the number stands there in the reasoning, in
|
|
54
|
-
* a quoted refusal, in the list of what the work does not do. Both sides of the link read this one
|
|
55
|
-
* declaration: read differently, one side would demand what the other does not see.
|
|
56
|
-
*/
|
|
57
|
-
function declaredEpicOf(body, number = null) {
|
|
58
|
-
const named = body.match(new RegExp(`задач[аи]\\s+эпика?\\s+(?:#|${TASK_KEY}-)(\\d+)`, 'i'))?.[1];
|
|
59
|
-
return number === null ? named : named !== undefined && Number(named) === number;
|
|
60
|
-
}
|
|
24
|
+
/** The labels of the cargo of the trees: those records are not tasks and are not judged as such. */
|
|
25
|
+
const CARGO_LABELS = CONFIG.board?.cargoLabels ?? [];
|
|
61
26
|
|
|
62
27
|
/**
|
|
63
28
|
* The link between a task and an epic, read in both directions.
|
|
@@ -95,33 +60,14 @@ export function checkEpicLinks(open, report) {
|
|
|
95
60
|
const unreadable = new Set();
|
|
96
61
|
|
|
97
62
|
for (const epic of epics) {
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
report(`#${epic.number}:
|
|
101
|
-
unreadable.add(epic.number);
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// The plan is the document that carries the makeup, not the first path in the body. A card
|
|
106
|
-
// names its decision next to its plan, and the decision has no table of tasks: read as the
|
|
107
|
-
// plan, it made the makeup empty and every open task of the epic read as not belonging to
|
|
108
|
-
// it — fourteen false lines at once, and the true ones drowned among them.
|
|
109
|
-
const onDisk = named.filter((path) => existsSync(join(ROOT, path)));
|
|
110
|
-
if (onDisk.length === 0) {
|
|
111
|
-
report(`#${epic.number}: the epic plan «${named[0]}» is not on disk — the card points into emptiness`);
|
|
112
|
-
unreadable.add(epic.number);
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const planPath = onDisk.find((path) => planRows(readFileSync(join(ROOT, path), 'utf8')) !== '') ?? null;
|
|
117
|
-
if (planPath === null) {
|
|
118
|
-
report(
|
|
119
|
-
`#${epic.number}: none of the documents the card names carries the makeup of the epic — «${onDisk.join('», «')}». The makeup is a table with a task column`
|
|
120
|
-
);
|
|
63
|
+
const found = planPathOf(epic.body);
|
|
64
|
+
if (found.path === null) {
|
|
65
|
+
report(`#${epic.number}: ${found.why}`);
|
|
121
66
|
unreadable.add(epic.number);
|
|
122
67
|
continue;
|
|
123
68
|
}
|
|
124
69
|
|
|
70
|
+
const planPath = found.path;
|
|
125
71
|
const plan = readFileSync(join(ROOT, planPath), 'utf8');
|
|
126
72
|
const mentions = planRows(plan).matchAll(new RegExp(`(?:#|${TASK_KEY}-)(\\d+)`, 'g'));
|
|
127
73
|
const numbers = new Set([...mentions].map((match) => Number(match[1])));
|
|
@@ -154,4 +100,206 @@ export function checkEpicLinks(open, report) {
|
|
|
154
100
|
report(`#${issue.number}: the body names the epic #${named}, and its plan does not carry the task — «take the next one» will not give it out`);
|
|
155
101
|
}
|
|
156
102
|
}
|
|
103
|
+
|
|
104
|
+
checkTasksOutsideEpics(open, epicNumbers, report);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The word by which a task declares itself as work outside an epic. It is written by the creating
|
|
109
|
+
* command from the word of the owner, and the audit reads exactly that shape: work outside an epic
|
|
110
|
+
* is lawful, and only the owner names it as such.
|
|
111
|
+
*/
|
|
112
|
+
const OUTSIDE_EPIC = /работа\s+вне\s+эпика/i;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* A task belonging to no epic and carrying no word of the owner about work outside one.
|
|
116
|
+
*
|
|
117
|
+
* The delivery guard refuses such a task at the creating command, and only there: a card made
|
|
118
|
+
* through the web goes past every guard, and one created before this order came in has neither
|
|
119
|
+
* line. By the queue it reads as ordinary work, and that nothing stands behind it shows nowhere —
|
|
120
|
+
* the audit is the only reader that comes for exactly this.
|
|
121
|
+
*
|
|
122
|
+
* The cargo of the trees is not judged: those records are not tasks at all — they have no title
|
|
123
|
+
* with a number, no executor and no place on the board, and never will.
|
|
124
|
+
*/
|
|
125
|
+
function checkTasksOutsideEpics(open, epicNumbers, report) {
|
|
126
|
+
for (const issue of open) {
|
|
127
|
+
if (epicNumbers.has(issue.number)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if ((issue.labels ?? []).some((label) => CARGO_LABELS.includes(label.name))) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const body = String(issue.body ?? '');
|
|
134
|
+
if (declaredEpicOf(body) !== undefined || OUTSIDE_EPIC.test(body)) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
report(
|
|
138
|
+
`#${issue.number}: the task names no epic, and no word of the owner about work outside one. Add the line «Задача эпика #<номер>, замысел — <путь>» or «Работа вне эпика — <слово владельца>»`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The tasks of an epic linked to its card as sub-issues.
|
|
145
|
+
*
|
|
146
|
+
* The plan of the epic holds the makeup, and the body of a task names the epic — but both are
|
|
147
|
+
* text, and the board reads neither. On the board a task of an epic looks exactly like a task
|
|
148
|
+
* outside one: the epic card shows no list of its tasks, no count of the done ones, and whoever
|
|
149
|
+
* looks at the board assembles both by hand from the list of open cards.
|
|
150
|
+
*
|
|
151
|
+
* A sub-issue is the hosting's own link between two cards, and it fills all three at once: the
|
|
152
|
+
* epic card gets the list, the task card gets the line about its parent, and the board card gets
|
|
153
|
+
* the "done of total" bar.
|
|
154
|
+
*
|
|
155
|
+
* The list of the epic's tasks is taken from its plan, as everywhere in this audit — the plan is
|
|
156
|
+
* the makeup. Closed tasks are judged too, unlike the rest of the audit: the bar counts them, and
|
|
157
|
+
* an epic whose closed tasks are not linked shows a share lower than the true one.
|
|
158
|
+
*
|
|
159
|
+
* Arguments: the open cards, the reporting function, the call options of the hosting client.
|
|
160
|
+
*/
|
|
161
|
+
export function checkEpicSubIssues(open, report, options) {
|
|
162
|
+
if (!EPIC_LABEL || !OWNER || !REPO) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const epics = open.filter((issue) => (issue.labels ?? []).some((label) => label.name === EPIC_LABEL));
|
|
167
|
+
for (const epic of epics) {
|
|
168
|
+
const found = planPathOf(epic.body);
|
|
169
|
+
if (found.path === null) {
|
|
170
|
+
// The unread plan has already been reported by a line of its own in the link check.
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const rows = planRows(readFileSync(join(ROOT, found.path), 'utf8'));
|
|
175
|
+
const named = new Set([...rows.matchAll(new RegExp(`(?:#|${TASK_KEY}-)(\\d+)`, 'g'))].map((match) => Number(match[1])));
|
|
176
|
+
named.delete(epic.number);
|
|
177
|
+
if (named.size === 0) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
let linked;
|
|
182
|
+
try {
|
|
183
|
+
// The list comes in pages, and an epic outgrows one page long before it is closed.
|
|
184
|
+
// Read by the first page alone, the audit calls a linked task unlinked: the line
|
|
185
|
+
// then stands in every run, the eye stops reading it, and a real divergence rides
|
|
186
|
+
// past together with it.
|
|
187
|
+
linked = new Set(
|
|
188
|
+
ghJson(['api', '--paginate', `repos/${OWNER}/${REPO}/issues/${epic.number}/sub_issues`, '--jq', '[.[].number]'], options)
|
|
189
|
+
);
|
|
190
|
+
} catch (error) {
|
|
191
|
+
if (error instanceof OfflineError) {
|
|
192
|
+
throw error;
|
|
193
|
+
}
|
|
194
|
+
// The hosting has no such link at all, or the call is refused: this is not a
|
|
195
|
+
// discrepancy of the tree, and a line about it would repeat every run.
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const missing = [...named].filter((number) => !linked.has(number)).sort((left, right) => left - right);
|
|
200
|
+
if (missing.length > 0) {
|
|
201
|
+
report(
|
|
202
|
+
`#${epic.number}: the plan names tasks that are not sub-issues of the epic card — ${missing.map((number) => `#${number}`).join(', ')}. On the board the epic then shows neither its makeup nor how much of it is done`
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The base of an open request about a task of an epic.
|
|
210
|
+
*
|
|
211
|
+
* The delivery guard judges this at the opening, and only there: a request opened by a person from
|
|
212
|
+
* the hosting page goes past it, and one opened before this order came in carries the base it was
|
|
213
|
+
* opened with. In the list of requests the base is not shown at all — the reader sees the title and
|
|
214
|
+
* the branch, and a request going into the main branch past its epic looks like every other.
|
|
215
|
+
*
|
|
216
|
+
* The branch of the epic is recognised by its number in the name, not by a list of refs: the audit
|
|
217
|
+
* reads the queue and does not go to the tree, and a base carrying the number of the epic is its
|
|
218
|
+
* branch — a task and its epic never share a number.
|
|
219
|
+
*/
|
|
220
|
+
export function checkEpicPullBase(open, pulls, report) {
|
|
221
|
+
if (!EPIC_LABEL) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const epicOf = new Map();
|
|
226
|
+
for (const issue of open) {
|
|
227
|
+
const named = declaredEpicOf(String(issue.body ?? ''));
|
|
228
|
+
if (named !== undefined) {
|
|
229
|
+
epicOf.set(issue.number, Number(named));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
for (const pull of pulls) {
|
|
234
|
+
const number = numberFromTitle(pull.title);
|
|
235
|
+
if (number === null || !epicOf.has(number)) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const epic = epicOf.get(number);
|
|
239
|
+
const base = String(pull.baseRefName ?? '');
|
|
240
|
+
if (base.startsWith(`${TASK_KEY}-${epic}-`)) {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
report(
|
|
244
|
+
`PR #${pull.number}: the task #${number} belongs to the epic #${epic}, and the base of the request is «${base}». A request past the epic takes the task out of it: the epic is handed in without it`
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Two states of an epic that nothing sees.
|
|
251
|
+
*
|
|
252
|
+
* **An epic without a branch.** Its branch is taken before the first of its tasks, and one that was
|
|
253
|
+
* not taken leaves every task standing on the main branch: the epic is then merged piece by piece,
|
|
254
|
+
* and there is nothing left to hand in whole. The card says nothing about a branch, and the list of
|
|
255
|
+
* requests shows none while no request is open from it.
|
|
256
|
+
*
|
|
257
|
+
* **An epic whose tasks are over.** Its request into the main branch opens when the last folder is
|
|
258
|
+
* taken apart, and until it opens the work of the whole epic lies outside the main branch while
|
|
259
|
+
* looking finished: every task is closed, the board is empty, and only the epic card stays open.
|
|
260
|
+
*
|
|
261
|
+
* Both are read by the same two things: the open tasks of the epic and the open requests. The
|
|
262
|
+
* branch of the epic is recognised by its number in the name — the audit reads the queue and does
|
|
263
|
+
* not go to the tree.
|
|
264
|
+
*/
|
|
265
|
+
export function checkEpicState(open, pulls, report) {
|
|
266
|
+
if (!EPIC_LABEL) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const epics = open.filter((issue) => (issue.labels ?? []).some((label) => label.name === EPIC_LABEL));
|
|
271
|
+
if (epics.length === 0) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const claimed = new Map();
|
|
276
|
+
for (const issue of open) {
|
|
277
|
+
const named = declaredEpicOf(String(issue.body ?? ''));
|
|
278
|
+
if (named !== undefined) {
|
|
279
|
+
claimed.set(issue.number, Number(named));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
for (const epic of epics) {
|
|
284
|
+
const prefix = `${TASK_KEY}-${epic.number}-`;
|
|
285
|
+
const fromEpic = pulls.filter((pull) => String(pull.headRefName ?? '').startsWith(prefix));
|
|
286
|
+
const intoEpic = pulls.filter((pull) => String(pull.baseRefName ?? '').startsWith(prefix));
|
|
287
|
+
const tasksLeft = [...claimed.entries()].filter(([, number]) => number === epic.number);
|
|
288
|
+
|
|
289
|
+
// A branch of the epic shows in a request either way: one from it, or one into it. Neither
|
|
290
|
+
// — and there is nothing in the queue to say the branch exists at all.
|
|
291
|
+
if (fromEpic.length === 0 && intoEpic.length === 0) {
|
|
292
|
+
report(
|
|
293
|
+
`#${epic.number}: the epic has no branch in the requests — neither one from it nor one into it. The branch of an epic is taken before its first task, and without it every task stands on the main branch`
|
|
294
|
+
);
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (tasksLeft.length === 0 && fromEpic.length === 0) {
|
|
299
|
+
report(
|
|
300
|
+
`#${epic.number}: the tasks of the epic are over, and no request from its branch is open. Until it opens, the work of the whole epic lies outside the main branch while looking finished`
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
157
304
|
}
|
|
305
|
+
|
|
@@ -19,9 +19,13 @@ import { CONFIG, ROOT } from './rt-kit-checks.config.mjs';
|
|
|
19
19
|
* The label of a multi-session card and the directory of work plans. Either of the two not named —
|
|
20
20
|
* the link is not judged at all: there would be nothing to tell a multi-session card from an
|
|
21
21
|
* ordinary one by, and every tree has its own directory of plans.
|
|
22
|
+
*
|
|
23
|
+
* The directory is taken from the tree's common one where the long work key does not name its own:
|
|
24
|
+
* the plan of an epic and the plan of many-session work lie side by side, and one directory named
|
|
25
|
+
* twice diverges by one of the two names.
|
|
22
26
|
*/
|
|
23
27
|
const LONG_LABEL = CONFIG.longWork?.label ?? '';
|
|
24
|
-
const PLANS_DIR = CONFIG.longWork?.plansDir
|
|
28
|
+
const PLANS_DIR = CONFIG.longWork?.plansDir || CONFIG.plansDir || '';
|
|
25
29
|
|
|
26
30
|
/** Work plan lines carrying the label word: only they count as an entry about several sessions. */
|
|
27
31
|
function markedRows() {
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The state of an open request read by its tip: a run pushed out of the queue, a missing run, a
|
|
3
|
+
* finished piece of work left as a draft, a conflict. Lives in a file of its own — the audit of
|
|
4
|
+
* the work queue stands at the length limit even without it, and these four checks are read
|
|
5
|
+
* together and apart from the rest.
|
|
6
|
+
*
|
|
7
|
+
* The line printer and the name of the main branch come as arguments: the module knows the
|
|
8
|
+
* hosting, not the settings of the tree that called it.
|
|
9
|
+
*/
|
|
10
|
+
import { onlyIgnoredPaths } from './board-paths.mjs';
|
|
11
|
+
import { evictedOnHead, headCommittedAt, runsOnHead, verdictOnHead } from './board-runs.mjs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* How long a fresh tip is given before it is asked about a run. Between the push and the start of
|
|
15
|
+
* the run some time passes, and a line inside that gap would mean «wait», not «fix».
|
|
16
|
+
*/
|
|
17
|
+
const RUN_GRACE_MINUTES = 10;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The run on the head of an open PR.
|
|
21
|
+
*
|
|
22
|
+
* A silent page and a green run read the same, and the event does not always reach the hosting:
|
|
23
|
+
* in the hour of its failures the push went through and no run started behind it. The audit names
|
|
24
|
+
* such a head while the PR is still open — after the merge it is too late to learn about it.
|
|
25
|
+
*
|
|
26
|
+
* What counts is the fact of a run, not its colour. A running and a failed run are both visible
|
|
27
|
+
* on the PR page; only absence is invisible, and the audit speaks of exactly that.
|
|
28
|
+
*
|
|
29
|
+
* A fresh head is not judged: time passes between the push and the run, and a red line in that
|
|
30
|
+
* gap would mean "wait", not "fix".
|
|
31
|
+
*
|
|
32
|
+
* A conflicting PR gets no run at all, and the cause is not a lost event: the pipeline checks the
|
|
33
|
+
* merge of the branch with its base, and under a conflict there is no merge. The advice to bring
|
|
34
|
+
* the event back is followed literally and does not help — in one session a PR was closed and
|
|
35
|
+
* reopened twice in a row, and the run started only after the main branch was merged in. So the
|
|
36
|
+
* line names the cause that can be fixed.
|
|
37
|
+
*/
|
|
38
|
+
export function checkHeadRun(pull, report, mainBranch, options) {
|
|
39
|
+
if (checkEvicted(pull, report, options)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (runsOnHead(pull.headRefOid, options) > 0) {
|
|
44
|
+
checkReadyDraft(pull, report, options);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const minutes = Math.floor((Date.now() - headCommittedAt(pull.headRefOid, options)) / 60000);
|
|
49
|
+
if (minutes < RUN_GRACE_MINUTES) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (onlyIgnoredPaths(pull, options)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (pull.mergeable === 'CONFLICTING') {
|
|
58
|
+
report(
|
|
59
|
+
`PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)} and there will be none while it conflicts — ` +
|
|
60
|
+
`the pipeline checks the merge of the branch with the base, and there is no merge while it conflicts; merge the main branch in and push, ` +
|
|
61
|
+
`reopening the PR does not help here`
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// A PR whose base is not the main branch gets no run at all: the workflow listens for PRs
|
|
68
|
+
// into the main branch and does not see events with another base. That is the order of
|
|
69
|
+
// handing in, not a discrepancy — every task of an epic is handed in exactly so — and the
|
|
70
|
+
// audit says nothing about it. The former line was wrong three times over: the event was not
|
|
71
|
+
// lost, reopening will not bring it back, and the base of a task request stays the epic
|
|
72
|
+
// branch to the merge.
|
|
73
|
+
if (pull.baseRefName && pull.baseRefName !== mainBranch) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
report(
|
|
78
|
+
`PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)}, and it has lain there ${minutes} min — ` +
|
|
79
|
+
`the pipeline received no event; bring it back by a new commit or by reopening the PR ` +
|
|
80
|
+
`(gh pr close ${pull.number} && gh pr reopen ${pull.number})`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A head run evicted from the pipeline queue.
|
|
86
|
+
*
|
|
87
|
+
* The queue group protects a running run and does not protect a waiting one: the hosting keeps
|
|
88
|
+
* one waiting run per group, and the next one to start evicts the previous. The branch behind
|
|
89
|
+
* such a run was not checked by a single line, yet by the work queue it looks checked — there is
|
|
90
|
+
* a run on the head, and the audit counts exactly the fact.
|
|
91
|
+
*
|
|
92
|
+
* Judged before the absence of a run and before the colour: otherwise one head gets two lines
|
|
93
|
+
* about one thing. Returns `true` when the line has been said, and the other head checks are
|
|
94
|
+
* skipped.
|
|
95
|
+
*
|
|
96
|
+
* The line names both commands, in the order they are called. The guard refuses a rerun until the
|
|
97
|
+
* output of that step has been read within the same turn, and the order in the line meets the
|
|
98
|
+
* requirement by itself: the executor calls what is written and does not hit a refusal on the
|
|
99
|
+
* second step.
|
|
100
|
+
*/
|
|
101
|
+
function checkEvicted(pull, report, options) {
|
|
102
|
+
const evicted = evictedOnHead(pull.headRefOid, options);
|
|
103
|
+
if (evicted.length === 0) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const run = evicted[0];
|
|
108
|
+
report(
|
|
109
|
+
`PR #${pull.number}: the run ${run} on the tip ${pull.headRefOid.slice(0, 8)} was pushed out of the pipeline queue — ` +
|
|
110
|
+
`it has zero steps, the branch was not checked, and in the list it looks failed; ` +
|
|
111
|
+
`read the run and restart it (gh run view ${run} && gh run rerun ${run})`
|
|
112
|
+
);
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Finished work left as a draft.
|
|
118
|
+
*
|
|
119
|
+
* On a draft the merge button is blocked by the hosting itself, so a green PR page allows the
|
|
120
|
+
* owner nothing: a list in which everything is grey reads as "the work is not done". The
|
|
121
|
+
* draft-lifting guard does not reach here — it judges one turn and stays silent while the branch
|
|
122
|
+
* carries its task folder; the audit looks at the state of the whole queue.
|
|
123
|
+
*
|
|
124
|
+
* Four PRs stood as drafts for two days — the analysis is the record
|
|
125
|
+
* "2026-08-18-ready-work-left-in-drafts" in the intake.
|
|
126
|
+
*/
|
|
127
|
+
function checkReadyDraft(pull, report, options) {
|
|
128
|
+
if (pull.isDraft !== true) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (verdictOnHead(pull.headRefOid, options) !== 'success') {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
report(
|
|
136
|
+
`PR #${pull.number}: the run on the tip ${pull.headRefOid.slice(0, 8)} is green, and the PR is a draft — ` +
|
|
137
|
+
`take the task folder apart and lift the draft (gh pr ready ${pull.number}) or tell the owner what you are waiting for`
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* A PR that conflicts with the main branch.
|
|
143
|
+
*
|
|
144
|
+
* A conflict arrives in a handed-over PR through someone else's merge, without a single action by
|
|
145
|
+
* its author: the base checked at opening goes stale the minute the owner merges a neighbouring
|
|
146
|
+
* piece of work. The draft-lifting guard does not reach here — it judges one turn, and a PR stands
|
|
147
|
+
* in the queue for days.
|
|
148
|
+
*
|
|
149
|
+
* Only a direct "conflicting" is judged: `UNKNOWN` means the hosting is still computing
|
|
150
|
+
* mergeability, and a line about it would go red on every fresh head. Two PRs went to review with
|
|
151
|
+
* a conflict this way — the analysis is the record
|
|
152
|
+
* "2026-08-20-drafts-cleared-without-re-reading-pr-state" in the intake.
|
|
153
|
+
*/
|
|
154
|
+
export function checkConflicting(pull, report) {
|
|
155
|
+
if (pull.mergeable !== 'CONFLICTING') {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
report(
|
|
160
|
+
`PR #${pull.number}: it conflicts with the main branch — merge it into the task branch, resolve the conflict and push; ` +
|
|
161
|
+
`the owner cannot merge this request, and on the page that shows only inside it`
|
|
162
|
+
);
|
|
163
|
+
}
|