@webpieces/rules-config 0.4.477 → 0.4.478
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/rules-config",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.478",
|
|
4
4
|
"description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,12 +9,17 @@
|
|
|
9
9
|
# TO ENABLE (client repo):
|
|
10
10
|
# 1. Copy this file to .github/workflows/webpieces-pr-gate.yml and commit it.
|
|
11
11
|
# 2. Set a committed "gateSalt" under the pr-gate section of webpieces.config.json (any non-empty string).
|
|
12
|
-
# 3. In branch-protection for `main`, mark
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
12
|
+
# 3. In branch-protection for `main`, mark THIS WORKFLOW'S JOB required:
|
|
13
|
+
# Webpieces PR Gate / Verify webpieces gate token
|
|
14
|
+
# That is the ONE required check — there is deliberately nothing else to pick. (Only a repo admin
|
|
15
|
+
# can set required checks; webpieces cannot do it for you.)
|
|
16
|
+
#
|
|
17
|
+
# NOTE if you are upgrading: earlier versions ALSO posted a `webpieces/pr-gate` commit status, and told
|
|
18
|
+
# you to require THAT instead of the job. It is gone. It only existed to recover from a race where
|
|
19
|
+
# wp-finish-upsert-pr pushed before writing the PR body — the body is now written FIRST, so the race
|
|
20
|
+
# cannot happen and the job is safe to require on its own. If you had `webpieces/pr-gate` marked required
|
|
21
|
+
# in branch protection, REPOINT it at the job above, or that context sits Pending forever and blocks
|
|
22
|
+
# every PR.
|
|
18
23
|
#
|
|
19
24
|
# NOTE: the salt is committed/obscurity-grade — it stops unhooked teammates, but a determined reader can
|
|
20
25
|
# read it and forge. It is deliberately not cryptographically sound; see RESPONSE-pr-gate-ci-enforcement.
|
|
@@ -26,13 +31,16 @@
|
|
|
26
31
|
name: Webpieces PR Gate
|
|
27
32
|
on:
|
|
28
33
|
pull_request:
|
|
29
|
-
# `edited`
|
|
30
|
-
# push
|
|
34
|
+
# `edited` is LOAD-BEARING, not a fallback — do NOT remove it. wp-start-upsert-pr pushes too, and that
|
|
35
|
+
# push fires `synchronize` while the PR body still carries the PREVIOUS run's token, so the check goes
|
|
36
|
+
# red. By the time wp-finish-upsert-pr runs, HEAD usually has not moved, so its push is a no-op that
|
|
37
|
+
# fires NO event — the only thing that re-triggers this job and clears the red is the `edited` event
|
|
38
|
+
# from finish writing the new body. Drop `edited` and every iteration leaves a stale red.
|
|
39
|
+
# `synchronize` is equally required: it is what catches an unhooked teammate pushing over a gated PR.
|
|
31
40
|
types: [opened, edited, synchronize, reopened]
|
|
32
41
|
permissions:
|
|
33
42
|
contents: read
|
|
34
43
|
pull-requests: read
|
|
35
|
-
statuses: write # wp-check-pr posts the webpieces/pr-gate commit status
|
|
36
44
|
jobs:
|
|
37
45
|
webpieces-pr-gate:
|
|
38
46
|
runs-on: ubuntu-latest
|