next-issue 6.6.120 → 6.6.121
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 +4 -0
- package/dist/config.mjs +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -596,6 +596,10 @@ because no pull request is opened.
|
|
|
596
596
|
The hunter adds `labels.hunt` to each issue it files, so you can tell those
|
|
597
597
|
issues apart from your own and filter them.
|
|
598
598
|
|
|
599
|
+
The names in `labels.ready`, `inProgress`, `inReview`, `done`, `needsHuman`
|
|
600
|
+
and `skip` must be distinct, also when case is ignored; two equal names stop
|
|
601
|
+
the run with an error that names both fields. `labels.hunt` may share a name.
|
|
602
|
+
|
|
599
603
|
An empty `labels.ready` turns the ready requirement off. The harness then
|
|
600
604
|
claims every open issue that no other label holds back.
|
|
601
605
|
|
package/dist/config.mjs
CHANGED
|
@@ -166,8 +166,25 @@ function parseLabels(value, defaultLabels) {
|
|
|
166
166
|
parsed[name] = text(labels[name], `labels.${name}`, name === 'ready');
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
rejectSameLabels(parsed);
|
|
169
170
|
return parsed;
|
|
170
171
|
}
|
|
172
|
+
// Label checks ignore case, so two status labels that match without case would
|
|
173
|
+
// make the harness read one status as another.
|
|
174
|
+
function rejectSameLabels(labels) {
|
|
175
|
+
const seen = new Map();
|
|
176
|
+
for (const name of LABEL_NAMES) {
|
|
177
|
+
if (name === 'hunt' || labels[name] === '') {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const key = labels[name].toLowerCase();
|
|
181
|
+
const other = seen.get(key);
|
|
182
|
+
if (other !== undefined) {
|
|
183
|
+
throw new Error(`${CONFIG_FILE}: labels.${other} and labels.${name} must be different labels, but both are ${labels[name]} when case is ignored.`);
|
|
184
|
+
}
|
|
185
|
+
seen.set(key, name);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
171
188
|
export function managedLabels(config) {
|
|
172
189
|
return LABEL_NAMES.filter((name) => name !== 'skip' && name !== 'hunt').map((name) => config.labels[name]);
|
|
173
190
|
}
|