@popoverai/dotrequirements 0.37.0 → 0.37.1
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.
|
@@ -97,8 +97,11 @@ const PR_STATUS_HELP = `
|
|
|
97
97
|
Reads the pull request of the outcome you are at, or of the outcome it awaits that
|
|
98
98
|
is kept on one, as GitHub reports it. The merge state is GitHub's word for whether
|
|
99
99
|
it can merge: clean means it can, with every required check passing and no
|
|
100
|
-
conflict. Failed checks come with a link to them
|
|
101
|
-
|
|
100
|
+
conflict. Failed checks come with a link to them and what they reported, as GitHub
|
|
101
|
+
gives it: their output and annotations, or the end of their job's log. Checks still
|
|
102
|
+
running are named. Each review follows, with its verdict and its comments, from the
|
|
103
|
+
repository's owners, members and collaborators and the apps installed on it; those
|
|
104
|
+
by anyone else are left out and counted. Reading it changes nothing.
|
|
102
105
|
`;
|
|
103
106
|
/** What `pr open` does, on its `--help`, where `author --help` sends the agent (PULL-2). */
|
|
104
107
|
const PULL_REQUEST_HELP = `
|
|
@@ -18,12 +18,15 @@ export type PullRequestState = {
|
|
|
18
18
|
name: string;
|
|
19
19
|
result: string;
|
|
20
20
|
link: string | null;
|
|
21
|
+
/** What the check reported, as GitHub gave it, or why it couldn't (PULL-4.7). */
|
|
22
|
+
reported?: unknown;
|
|
21
23
|
}>;
|
|
22
24
|
running: Array<{
|
|
23
25
|
name: string;
|
|
24
26
|
link: string | null;
|
|
25
27
|
}>;
|
|
26
28
|
head: string;
|
|
29
|
+
reviews?: unknown;
|
|
27
30
|
};
|
|
28
31
|
/** Where the pull request stands, as a reviewer reads it (PULL-4). */
|
|
29
32
|
export declare function describeState(state: PullRequestState): string;
|
|
@@ -27,7 +27,14 @@ async function stateFor(where) {
|
|
|
27
27
|
}
|
|
28
28
|
if (!said.state)
|
|
29
29
|
throw new Error("The app gave no pull request.");
|
|
30
|
-
return said.
|
|
30
|
+
return said.reviews === undefined
|
|
31
|
+
? said.state
|
|
32
|
+
: { ...said.state, reviews: said.reviews };
|
|
33
|
+
}
|
|
34
|
+
/** What GitHub reported, as it gave it, indented under the line it belongs to. */
|
|
35
|
+
function asGiven(reported, indent) {
|
|
36
|
+
const text = typeof reported === "string" ? reported : JSON.stringify(reported, null, 2);
|
|
37
|
+
return text.split("\n").map((line) => `${indent}${line}`);
|
|
31
38
|
}
|
|
32
39
|
/** Where the pull request stands, as a reviewer reads it (PULL-4). */
|
|
33
40
|
export function describeState(state) {
|
|
@@ -40,6 +47,10 @@ export function describeState(state) {
|
|
|
40
47
|
];
|
|
41
48
|
for (const check of state.failed) {
|
|
42
49
|
lines.push(` failed: ${check.name} (${check.result})${check.link ? ` ${check.link}` : ""}`);
|
|
50
|
+
// PULL-4.7: what it reported, as GitHub gave it.
|
|
51
|
+
if (check.reported !== undefined) {
|
|
52
|
+
lines.push(" It reported:", ...asGiven(check.reported, " "));
|
|
53
|
+
}
|
|
43
54
|
}
|
|
44
55
|
for (const check of state.running) {
|
|
45
56
|
lines.push(` still running: ${check.name}${check.link ? ` ${check.link}` : ""}`);
|
|
@@ -48,6 +59,10 @@ export function describeState(state) {
|
|
|
48
59
|
// PULL-4.3.
|
|
49
60
|
lines.push("GitHub hasn't yet worked out whether it can merge: read it again shortly.");
|
|
50
61
|
}
|
|
62
|
+
// PULL-4.8: each review, with its verdict and its comments.
|
|
63
|
+
if (state.reviews !== undefined) {
|
|
64
|
+
lines.push("Reviews and their comments, as GitHub gave them:", ...asGiven(state.reviews, " "));
|
|
65
|
+
}
|
|
51
66
|
return lines.join("\n");
|
|
52
67
|
}
|
|
53
68
|
/**
|
package/package.json
CHANGED