@grimoire-rs/indexer 0.4.2 → 0.4.3
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 +14 -5
- package/dist/ratings/config.d.ts +20 -9
- package/dist/ratings/config.d.ts.map +1 -1
- package/dist/ratings/config.js +1 -1
- package/dist/ratings/config.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ CI (`npm run ci`). The block is optional; without it nothing is tallied.
|
|
|
176
176
|
"provider": "github", // "github" | "gitlab"
|
|
177
177
|
"container": "Ratings", // GitHub: Discussions category. GitLab: work item type.
|
|
178
178
|
"createBudget": 400, // threads created per run; default 400
|
|
179
|
-
"lockThreads":
|
|
179
|
+
"lockThreads": false // default FALSE - a locked thread cannot be voted on
|
|
180
180
|
}
|
|
181
181
|
```
|
|
182
182
|
|
|
@@ -186,10 +186,19 @@ author allowlist is `index-policy.json`'s `trustedBots[].id`, and a second copy
|
|
|
186
186
|
of the same ids in a second file is a consistency hazard rather than a
|
|
187
187
|
convenience.
|
|
188
188
|
|
|
189
|
-
`lockThreads` defaults to `
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
`lockThreads` defaults to `false`, and did not always. A lock looks like the
|
|
190
|
+
low-moderation default — a rating signal without a comment forum to moderate —
|
|
191
|
+
but on GitLab it also stops the voting. The work-item UI draws the thumbs-up
|
|
192
|
+
control on a locked item and ignores the click, guarding on `discussionLocked`
|
|
193
|
+
without sending the mutation, while REST and GraphQL both accept a reaction on
|
|
194
|
+
that same item and read it back. So nothing warns you: the tally runs, the
|
|
195
|
+
threads look healthy, and every one of them is unvotable by the only means most
|
|
196
|
+
people have.
|
|
197
|
+
|
|
198
|
+
Setting it costs nothing in marker authority — R-1 reads the thread body and
|
|
199
|
+
never a comment, so a reply cannot forge a marker either way. Turn it on if you
|
|
200
|
+
would rather moderate nothing and have checked that your forge still lets a
|
|
201
|
+
human react; GitHub Discussions are untested here.
|
|
193
202
|
|
|
194
203
|
Re-rendering with the block present adds one job to the generated pipeline
|
|
195
204
|
(`ratings` on GitHub, `grim-indexer:ratings` on GitLab), an hourly schedule, and
|
package/dist/ratings/config.d.ts
CHANGED
|
@@ -30,15 +30,26 @@ export interface RatingsConfig {
|
|
|
30
30
|
*/
|
|
31
31
|
createBudget: number;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
* Lock every thread on creation. **Default `false`.**
|
|
34
|
+
*
|
|
35
|
+
* It defaulted to `true`, on the belief that a lock refuses replies while
|
|
36
|
+
* votes still count. On GitLab that second half is not true: the work-item
|
|
37
|
+
* UI renders the thumbs-up control on a locked item and then does nothing
|
|
38
|
+
* when a human clicks it — the frontend guards on `discussionLocked` and
|
|
39
|
+
* never sends the mutation. Nothing surfaces that from the API side, where
|
|
40
|
+
* REST and GraphQL both accept a reaction on a locked item and read it back,
|
|
41
|
+
* so an index could tally happily while every thread it created was
|
|
42
|
+
* unvotable by the only means most people have.
|
|
43
|
+
*
|
|
44
|
+
* A thread exists to be voted on, so the default may not foreclose voting.
|
|
45
|
+
* GitHub Discussions are untested here and may well behave differently;
|
|
46
|
+
* `true` remains available for an operator who wants it and has checked.
|
|
47
|
+
*
|
|
48
|
+
* Turning it on costs nothing in marker authority. R-1 clause 1 reads the
|
|
49
|
+
* thread *body* and never a comment, so a reply cannot forge a marker
|
|
50
|
+
* whether or not the thread is locked — the lock was only ever a second
|
|
51
|
+
* barrier in front of a rule that already holds on its own.
|
|
52
|
+
*/
|
|
42
53
|
lockThreads: boolean;
|
|
43
54
|
}
|
|
44
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/ratings/config.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAAyB,CAAC;AAEpF,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/ratings/config.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAAyB,CAAC;AAEpF,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;MAoBE;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAgCvE;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAkBxF"}
|
package/dist/ratings/config.js
CHANGED
|
@@ -54,7 +54,7 @@ export function validateRatings(raw) {
|
|
|
54
54
|
provider: ratings.provider,
|
|
55
55
|
container: ratings.container,
|
|
56
56
|
createBudget: ratings.createBudget ?? DEFAULT_CREATE_BUDGET,
|
|
57
|
-
lockThreads: ratings.lockThreads ??
|
|
57
|
+
lockThreads: ratings.lockThreads ?? false,
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/ratings/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,sCAAsC;AAEtC,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,6DAA6D;AAC7D,EAAE;AACF,sEAAsE;AACtE,+EAA+E;AAC/E,4EAA4E;AAC5E,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAS5D,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEpF,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/ratings/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,sCAAsC;AAEtC,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,6DAA6D;AAC7D,EAAE;AACF,sEAAsE;AACtE,+EAA+E;AAC/E,4EAA4E;AAC5E,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAS5D,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEpF,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAgDzC,SAAS,IAAI,CAAC,GAAW;IACvB,MAAM,IAAI,eAA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