next-issue 6.6.102 → 6.6.103
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 +6 -1
- package/dist/skip.mjs +19 -0
- package/dist/unsettled.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,7 +328,12 @@ reaches the landing first does not keep it from checking the base. Once a person
|
|
|
328
328
|
takes the label off, the issue resumes, checks the base and waits for the
|
|
329
329
|
checks of its commit; when those are known (the issue is done, or its
|
|
330
330
|
commits are reverted or found not on the base), the next run lands the
|
|
331
|
-
held issues again.
|
|
331
|
+
held issues again. A person who gives such an issue up instead (the `skip`
|
|
332
|
+
label, which **Give up** in pi adds) releases the block: the next run skips
|
|
333
|
+
the issue, drops its halt from the state and logs a `land.released` event,
|
|
334
|
+
so other issues land again on a base whose last checks nobody read. The state
|
|
335
|
+
keeps the commits, so taking the `skip` label off later resumes the issue
|
|
336
|
+
and checks them. Such a resume is not held back
|
|
332
337
|
by another halted issue while it only checks its commit already on the
|
|
333
338
|
base; a fix it has to land waits like any other change. The hand-over
|
|
334
339
|
comment says so.
|
package/dist/skip.mjs
CHANGED
|
@@ -4,6 +4,8 @@ import { message } from './errors.mjs';
|
|
|
4
4
|
import { handOverReply } from './hand-over-comments.mjs';
|
|
5
5
|
import { stopNow } from './handover.mjs';
|
|
6
6
|
import { hasLabel } from './labels.mjs';
|
|
7
|
+
import { writeState } from './state.mjs';
|
|
8
|
+
import { heldOnBase } from './unsettled.mjs';
|
|
7
9
|
export function skipReason(issue, config, resuming, answered = false) {
|
|
8
10
|
const has = (name) => hasLabel(issue.labels, name);
|
|
9
11
|
const names = config.labels;
|
|
@@ -33,6 +35,14 @@ export async function skipReport(context, log, issue, saved, started) {
|
|
|
33
35
|
const skip = skipReason(issue, context.config, saved !== undefined, answered);
|
|
34
36
|
if (skip !== undefined) {
|
|
35
37
|
log.event('issue.skip', { title: issue.title, reason: skip });
|
|
38
|
+
if (saved?.halted === true && hasLabel(issue.labels, context.config.labels.skip)) {
|
|
39
|
+
try {
|
|
40
|
+
await release(context, log, saved);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return readError(log, issue, saved, error, started);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
36
46
|
return skipped(issue);
|
|
37
47
|
}
|
|
38
48
|
if (saved !== undefined) {
|
|
@@ -51,6 +61,15 @@ export async function skipReport(context, log, issue, saved, started) {
|
|
|
51
61
|
}
|
|
52
62
|
return undefined;
|
|
53
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* A person gave up on a halted issue: it never resumes to check the base while it has the skip label, so its halt
|
|
66
|
+
* stops blocking the landings of other issues. The state keeps what is on the base for a later resume.
|
|
67
|
+
*/
|
|
68
|
+
async function release(context, log, saved) {
|
|
69
|
+
delete saved.halted;
|
|
70
|
+
await writeState(context.repo, saved);
|
|
71
|
+
log.event('land.released', { held: heldOnBase(saved, context.base) });
|
|
72
|
+
}
|
|
54
73
|
async function hasAnswer(context, issue, saved) {
|
|
55
74
|
if (!hasLabel(issue.labels, context.config.labels.needsHuman)) {
|
|
56
75
|
return false;
|
package/dist/unsettled.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export function heldOnBase(state, base) {
|
|
|
13
13
|
.join(', ');
|
|
14
14
|
}
|
|
15
15
|
/** What a halt with an unchecked commit on the base means for the next runs. */
|
|
16
|
-
export const HALT_NOTE = 'The run halts, and no run lands another change until this issue resumes (after an answer or once the label is off) and checks the base.';
|
|
16
|
+
export const HALT_NOTE = 'The run halts, and no run lands another change until this issue resumes (after an answer or once the label is off) and checks the base, or a person gives it up with the skip label.';
|
|
17
17
|
/** Whether this state keeps every run from landing: it halted with a commit on the base whose checks are still unknown. */
|
|
18
18
|
export function blocksLanding(state, base) {
|
|
19
19
|
return state.halted === true && state.closing !== true && heldOnBase(state, base) !== '';
|