ework-aio 0.5.32 → 0.5.33

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": "ework-aio",
3
- "version": "0.5.32",
3
+ "version": "0.5.33",
4
4
  "description": "All-in-one installer for ework (issue tracker) + ework-daemon (AI bridge) + opencode-ework (plugin). One command: npm i -g ework-aio && ework-aio install.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -749,11 +749,19 @@ if [[ "$ROUTIER_HEALTH_CODE" == "200" ]]; then
749
749
  fi
750
750
 
751
751
  info "router forwards webhook to daemon (POST /webhook/gitea)"
752
+ ROUTER_HOOK_PAYLOAD='{"action":"opened","issue":{"number":99999,"title":"router-test","body":"e2e router forward test","state":"open","user":{"login":"e2e"}},"repository":{"owner":{"login":"e2e"},"name":"test"}}'
753
+ ROUTER_HOOK_SECRET=$(env_val GITEA_WEBHOOK_SECRET "$DATA_DIR/ework-daemon/.env")
754
+ ROUTER_HOOK_HDR=""
755
+ if [[ -n "$ROUTER_HOOK_SECRET" ]]; then
756
+ ROUTER_HOOK_SIG=$(printf '%s' "$ROUTER_HOOK_PAYLOAD" | openssl dgst -sha256 -hmac "$ROUTER_HOOK_SECRET" -hex | awk '{print $NF}')
757
+ ROUTER_HOOK_HDR="-H x-gitea-signature:$ROUTER_HOOK_SIG"
758
+ fi
752
759
  ROUTER_FORWARD_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \
753
760
  --max-time 10 \
754
761
  -X POST \
755
762
  -H "Content-Type: application/json" \
756
- -d '{"action":"opened","issue":{"number":99999,"title":"router-test","body":"e2e router forward test","state":"open","user":{"login":"e2e"}},"repository":{"owner":{"login":"e2e"},"name":"test"}}' \
763
+ $ROUTER_HOOK_HDR \
764
+ -d "$ROUTER_HOOK_PAYLOAD" \
757
765
  "http://127.0.0.1:$ROUTER_PORT/webhook/gitea" 2>/dev/null || echo "000")
758
766
  case "$ROUTER_FORWARD_CODE" in
759
767
  200|204)