@kitman-sh/software-engineering 0.10.69 → 0.10.71
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/dist/bundle.js +515 -128
- package/dist/declarations.json +206 -22
- package/package.json +3 -3
- package/src/build.ts +10 -1
- package/src/change-request-body.ts +73 -5
- package/src/errand.ts +16 -4
- package/src/hillclimb.ts +26 -3
- package/src/plan.ts +26 -6
- package/src/review.ts +103 -36
- package/src/shepherd-output.ts +12 -1
- package/src/shepherd.ts +453 -104
- package/src/sweep.ts +16 -3
- package/src/tidy.ts +3 -0
package/src/sweep.ts
CHANGED
|
@@ -8,12 +8,15 @@ import {
|
|
|
8
8
|
defineLoop,
|
|
9
9
|
openChangeRequests,
|
|
10
10
|
ownChangeRequests,
|
|
11
|
+
pipelineStatus,
|
|
12
|
+
testsNotRunReasons,
|
|
11
13
|
verify,
|
|
12
14
|
type OpenChangeRequests,
|
|
13
15
|
type VerifyResult
|
|
14
16
|
} from '@kitman-sh/sdk/loop'
|
|
15
17
|
import * as Effect from 'effect/Effect'
|
|
16
18
|
import * as Schema from 'effect/Schema'
|
|
19
|
+
import { notVerifiedSection, verifyHead } from './change-request-body'
|
|
17
20
|
import shepherd from './shepherd'
|
|
18
21
|
|
|
19
22
|
const Input = Schema.Struct({
|
|
@@ -182,7 +185,7 @@ const reportText = (landing: readonly Placed[], left: readonly Placed[], heading
|
|
|
182
185
|
*/
|
|
183
186
|
export default defineLoop({
|
|
184
187
|
id: 'sweep',
|
|
185
|
-
version: '1.
|
|
188
|
+
version: '1.1.0',
|
|
186
189
|
title: 'Sweep',
|
|
187
190
|
input: Input,
|
|
188
191
|
output: Output,
|
|
@@ -199,9 +202,14 @@ export default defineLoop({
|
|
|
199
202
|
const [earlier] = (yield* ownChangeRequests('earlier')).changeRequests
|
|
200
203
|
|
|
201
204
|
if (earlier !== undefined) {
|
|
205
|
+
const { head } = yield* pipelineStatus('earlier-head', { changeRequestId: earlier.id })
|
|
206
|
+
// Tests verify never ran at the batch's head are for a person to run before it lands, as when it was opened.
|
|
207
|
+
const { notRun } = yield* verifyHead('earlier-verify', head)
|
|
208
|
+
|
|
202
209
|
const landed = yield* call('land', shepherd, {
|
|
203
210
|
changeRequestId: earlier.id,
|
|
204
|
-
merge:
|
|
211
|
+
merge: notRun.length === 0,
|
|
212
|
+
...(notRun.length === 0 ? undefined : { notRun }),
|
|
205
213
|
...(input.branch === undefined ? undefined : { branch: input.branch })
|
|
206
214
|
})
|
|
207
215
|
|
|
@@ -340,10 +348,13 @@ export default defineLoop({
|
|
|
340
348
|
)
|
|
341
349
|
}
|
|
342
350
|
|
|
351
|
+
const notVerified = notVerifiedSection(checked)
|
|
352
|
+
|
|
343
353
|
const opened = yield* changeRequest('change-request', {
|
|
344
354
|
title: `Update ${landing.length} ${landing.length === 1 ? 'dependency' : 'dependencies'}`,
|
|
345
355
|
body: [
|
|
346
356
|
batched.summary,
|
|
357
|
+
...(notVerified === undefined ? [] : [notVerified]),
|
|
347
358
|
supersedes,
|
|
348
359
|
...landing.map(supersededLine),
|
|
349
360
|
...(left.length === 0
|
|
@@ -354,7 +365,9 @@ export default defineLoop({
|
|
|
354
365
|
|
|
355
366
|
const landed = yield* call('land', shepherd, {
|
|
356
367
|
changeRequestId: opened.id,
|
|
357
|
-
|
|
368
|
+
// Tests the batch made verify skip are for a person to run before it lands.
|
|
369
|
+
merge: notVerified === undefined,
|
|
370
|
+
...(notVerified === undefined ? undefined : { notRun: testsNotRunReasons(checked) }),
|
|
358
371
|
...(input.branch === undefined ? undefined : { branch: input.branch })
|
|
359
372
|
})
|
|
360
373
|
|
package/src/tidy.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
rallyStop,
|
|
12
12
|
settleRound,
|
|
13
13
|
syncBase,
|
|
14
|
+
testsNotRunReasons,
|
|
14
15
|
verify
|
|
15
16
|
} from '@kitman-sh/sdk/loop'
|
|
16
17
|
import * as Effect from 'effect/Effect'
|
|
@@ -149,11 +150,13 @@ export default defineLoop({
|
|
|
149
150
|
|
|
150
151
|
const base = yield* verify('verify:base', { revision: start })
|
|
151
152
|
const head = yield* verify('verify', {})
|
|
153
|
+
const notRun = testsNotRunReasons(head)
|
|
152
154
|
|
|
153
155
|
const reviewed = yield* call('review', review, {
|
|
154
156
|
base: start,
|
|
155
157
|
head: head.revision,
|
|
156
158
|
outcome: 'refactor',
|
|
159
|
+
...(notRun.length === 0 ? undefined : { notRun }),
|
|
157
160
|
claims: improvement.claims
|
|
158
161
|
})
|
|
159
162
|
|