anhao opened a new pull request, #4365: URL: https://github.com/apache/hertzbeat/pull/4365
## Summary Add **WPUSH** (https://wpush.cn) as a new alert notice receiver type in HertzBeat, mirroring the ServerChan / Gotify / Ntfy handler pattern. - New notice type: **`type() == 16`** (verified free after Ntfy at 15) - API: `POST https://api.wpush.cn/api/v1/send` with JSON body `apikey`, `title`, `content`, optional `channel` (default wechat), optional `topic_code` - **Success criterion:** HTTP 200 **and** response JSON `code == 0` (integer). HTTP 2xx alone is **not** treated as success (unlike many existing handlers) - Receiver fields: `wpushToken` (API key, masked), optional `wpushChannel`, optional `wpushTopicCode` - Apikey is never logged in cleartext ## Files changed **Backend** - `WPushAlertNotifyHandlerImpl` + unit test (`code==0` success / nonzero failure) - `NoticeReceiver` fields + `NoticeReceiverMaskUtil` secret list (+ test coverage) - `AlerterProperties.wpushWebhookUrl` - Preset template `16-WPushTemplate.txt` (for `PresetNoticeTemplateCoverageTest`) **Frontend** - `NoticeReceiver.ts`, alert-notice-receiver / alert-notice-template UI - i18n: en-US, zh-CN, zh-TW, ja-JP, ko-KR, pt-BR **Docs** - No dedicated `alert_wpush.md` — ServerChan / Gotify / Ntfy siblings also lack standalone help pages ## Test plan - [ ] Unit: `WPushAlertNotifyHandlerImplTest` (success when `code==0`, fail when nonzero / non-200 / missing token) - [ ] Unit: `NoticeReceiverMaskUtilTest` includes `wpushToken` - [ ] Manual: configure WPUSH receiver in UI, send test notice, confirm delivery - [ ] Confirm type 16 does not collide with other handlers ## Notes - Local box could not install JDK 25 (apt mirror 502); focused unit tests were not executed here — please rely on CI. - ICLA for Apache contribution can be completed later if required by the community process. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
