@windyroad/risk-scorer 0.1.4-preview.29 → 0.1.4-preview.32
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/hooks/git-push-gate.sh +8 -1
- package/package.json +1 -1
package/hooks/git-push-gate.sh
CHANGED
|
@@ -72,12 +72,19 @@ if echo "$COMMAND" | grep -qE '(^|;|&&|\|\|)\s*npm run push:watch(\s|$)'; then
|
|
|
72
72
|
exit 0
|
|
73
73
|
fi
|
|
74
74
|
|
|
75
|
+
# Block `changeset version` — versioning is done by the release pipeline,
|
|
76
|
+
# not locally. Creating changesets (`npx changeset`) is fine.
|
|
77
|
+
if echo "$COMMAND" | grep -qE '(^|;|&&|\|\|)\s*(npx changeset|npm run changeset)\s+version(\s|$)'; then
|
|
78
|
+
risk_gate_deny "Do not run \`changeset version\` locally. The release pipeline handles versioning automatically. To release: (1) push your changes with \`npm run push:watch\`, (2) the pipeline creates a release PR via changesets, (3) merge the release PR to publish. If you need to create a changeset, use \`npx changeset\` (without \`version\`)."
|
|
79
|
+
exit 0
|
|
80
|
+
fi
|
|
81
|
+
|
|
75
82
|
# Gate changeset creation on release risk score (fail-closed).
|
|
76
83
|
# Changesets feed directly into releases, so gate on the release score.
|
|
77
84
|
if echo "$COMMAND" | grep -qE '(^|;|&&|\|\|)\s*(npx changeset|npm run changeset)(\s|$)'; then
|
|
78
85
|
if [ -n "$SESSION_ID" ]; then
|
|
79
86
|
if ! check_risk_gate "$SESSION_ID" "release"; then
|
|
80
|
-
risk_gate_deny "Changeset blocked: ${RISK_GATE_REASON}"
|
|
87
|
+
risk_gate_deny "Changeset blocked: ${RISK_GATE_REASON}. To create a changeset, the release risk score must be within appetite. Delegate to wr-risk-scorer:pipeline (subagent_type: 'wr-risk-scorer:pipeline') to assess."
|
|
81
88
|
exit 0
|
|
82
89
|
fi
|
|
83
90
|
fi
|
package/package.json
CHANGED