pr-shepherd 0.16.0 → 0.16.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.
package/README.md
CHANGED
|
@@ -259,10 +259,6 @@ Full reference: [docs/README.md](docs/README.md) — CLI usage, skills, configur
|
|
|
259
259
|
|
|
260
260
|
See [docs/architecture.md](docs/architecture.md) for the module map and dependency rules.
|
|
261
261
|
|
|
262
|
-
## Forking
|
|
263
|
-
|
|
264
|
-
See [docs/forking.md](docs/forking.md) if you want to customize pr-shepherd for your own use or team.
|
|
265
|
-
|
|
266
262
|
## License
|
|
267
263
|
|
|
268
264
|
[MIT](LICENSE)
|
package/bin/cli/exit-codes.mjs
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function buildTerminalReport(prNumber, repo, batchData, mergeStatus, status) {
|
|
2
|
+
return {
|
|
3
|
+
pr: prNumber,
|
|
4
|
+
nodeId: batchData.nodeId,
|
|
5
|
+
repo: `${repo.owner}/${repo.name}`,
|
|
6
|
+
status,
|
|
7
|
+
baseBranch: batchData.baseRefName,
|
|
8
|
+
mergeStatus,
|
|
9
|
+
checks: {
|
|
10
|
+
passing: [],
|
|
11
|
+
failing: [],
|
|
12
|
+
inProgress: [],
|
|
13
|
+
skipped: [],
|
|
14
|
+
filtered: [],
|
|
15
|
+
filteredNames: [],
|
|
16
|
+
blockedByFilteredCheck: false,
|
|
17
|
+
},
|
|
18
|
+
threads: {
|
|
19
|
+
actionable: [],
|
|
20
|
+
resolutionOnly: [],
|
|
21
|
+
autoResolved: [],
|
|
22
|
+
autoResolveErrors: [],
|
|
23
|
+
firstLook: [],
|
|
24
|
+
},
|
|
25
|
+
comments: {
|
|
26
|
+
actionable: [],
|
|
27
|
+
firstLook: [],
|
|
28
|
+
},
|
|
29
|
+
changesRequestedReviews: [],
|
|
30
|
+
reviewSummaries: [],
|
|
31
|
+
firstLookSummaries: [],
|
|
32
|
+
editedSummaries: [],
|
|
33
|
+
approvedReviews: [],
|
|
34
|
+
};
|
|
35
|
+
}
|
package/bin/commands/check.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { deriveMergeStatus } from "../merge-status/derive.mjs";
|
|
|
9
9
|
import { loadConfig } from "../config/load.mjs";
|
|
10
10
|
import { classifyVisibleComments } from "../comments/visible-comments.mjs";
|
|
11
11
|
import { computeStatus } from "./check-status.mjs";
|
|
12
|
+
import { buildTerminalReport } from "./check-terminal-report.mjs";
|
|
12
13
|
import { loadSeenMap, markSeen, classifyItem } from "../state/seen-comments.mjs";
|
|
13
14
|
export async function runCheck(opts) {
|
|
14
15
|
const repo = await getRepoInfo();
|
|
@@ -30,6 +31,10 @@ export async function runCheck(opts) {
|
|
|
30
31
|
mergeStateStatus: restState.mergeStateStatus ?? batchData.mergeStateStatus,
|
|
31
32
|
};
|
|
32
33
|
}
|
|
34
|
+
const mergeStatus = deriveMergeStatus(batchData);
|
|
35
|
+
if (mergeStatus.state === "MERGED" || mergeStatus.state === "CLOSED") {
|
|
36
|
+
return buildTerminalReport(prNumber, repo, batchData, mergeStatus, mergeStatus.state);
|
|
37
|
+
}
|
|
33
38
|
const startupFailureChecks = await fetchStartupFailureChecks(repo, batchData.headRefOid, prNumber);
|
|
34
39
|
const allChecks = mergeStartupFailureChecks(batchData.checks, startupFailureChecks);
|
|
35
40
|
const classifiedChecks = classifyChecks(allChecks);
|
|
@@ -111,7 +116,6 @@ export async function runCheck(opts) {
|
|
|
111
116
|
...[...firstLookSummaries, ...editedSummaries].map((r) => markSeen(stateKey, r.id, r.body)),
|
|
112
117
|
]);
|
|
113
118
|
const resolutionOnlyThreads = unresolvedThreads.filter((t) => !autoResolvedIds.has(t.id) && (t.isOutdated || t.isMinimized));
|
|
114
|
-
const mergeStatus = deriveMergeStatus(batchData);
|
|
115
119
|
const blockedByFilteredCheck = mergeStatus.status === "BLOCKED" &&
|
|
116
120
|
!verdict.anyFailing &&
|
|
117
121
|
!verdict.anyInProgress &&
|
package/package.json
CHANGED