{"id":13602253,"url":"https://github.com/tlikai/hwamei","last_synced_at":"2025-03-18T18:40:13.152Z","repository":{"id":32253092,"uuid":"130488533","full_name":"tlikai/hwamei","owner":"tlikai","description":"企业微信webhook，企业微信群机器人webhook，支持Github、Gitlab、Sentry等Webhook","archived":false,"fork":false,"pushed_at":"2023-03-01T20:53:59.000Z","size":97,"stargazers_count":200,"open_issues_count":12,"forks_count":26,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-07T05:38:49.566Z","etag":null,"topics":["github","gitlab","jenkins","sentry","webhook","wxwork"],"latest_commit_sha":null,"homepage":"https://dinglingdingling.com?utm_source=github_website","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlikai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-21T15:48:27.000Z","updated_at":"2024-09-16T06:00:43.000Z","dependencies_parsed_at":"2024-01-14T06:04:03.229Z","dependency_job_id":"b011f663-8857-4519-a25d-99ba53f1bd3d","html_url":"https://github.com/tlikai/hwamei","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlikai%2Fhwamei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlikai%2Fhwamei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlikai%2Fhwamei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlikai%2Fhwamei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlikai","download_url":"https://codeload.github.com/tlikai/hwamei/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244282967,"owners_count":20428103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","gitlab","jenkins","sentry","webhook","wxwork"],"created_at":"2024-08-01T18:01:17.981Z","updated_at":"2025-03-18T18:40:13.128Z","avatar_url":"https://github.com/tlikai.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# hwamei\n\n## 推荐使用 [DinglingDingling](https://dinglingdingling.com/?utm_source=github_hwamei) 替代本项目，无需部署，简单配置即可打通企业微信群机器人与Github、Gitlab、Sentry、Jenkins 等工具 webhook。\n\nhwamei 是一个基于 hubot 的企业微信聊天机器人，它能够通过 webhook 将收集的信息发送到企业微信群中。\n\n已兼容企业微信原生webhook机器人！！！ 具体见 https://github.com/tlikai/hwamei/pull/2\n\n## 预览\n\n![企业微信群聊天机器人](http://p.qpic.cn/pic_wework/439528718/dadcc3d69e2a69710cbb7ce270aab93f77fa86e5d64bf11c/0)\n\n## 工作流程\n\n![工作流程](./data/flow.png)\n\n## 安装\n\n- `git clone https://github.com/tlikai/hwamei.git`\n- 运行 `npm install`\n- 复制 sample.env 为 .env\n- 到企业微信后台创建一个应用\n- 将企业微信的 corpId 和 新建应用的 secret 填入 .env 文件\n\n## 使用\n\n- 运行 `./bin/hubot` 即可启动 hwamei\n\n- 目前支持通过命令管理企业微信群、管理 webhook\n\n## 部署\n\n见 https://github.com/hubotio/hubot/blob/master/docs/deploying.md\n\n## 企业微信相关命令\n\n- `hwamei\u003ewxwork create chat {chatid} with {users}` 创建一个群, users 以英文逗号分隔\n- `hwamei\u003ewxwork destroy chat {chatid}` 删除一个群\n- `hwamei\u003ewxwork show {chatid}` 显示群信息\n- `hwamei\u003ewxwork add {userid} to {chatid}` 添加用户到指定群\n- `hwamei\u003ewxwork remove {userid} from {chatid}` 从指定群中删除用户\n\n企业微信消息推送文档 https://work.weixin.qq.com/api/doc#90000/90135/90243\n\n## webhook 相关命令\n\n- `hwamei\u003ewebhook create {name} from {type} to {chatid}` 创建一个 webhook\n- `hwamei\u003ewebhook list` 列出所有 webhook\n- `hwamei\u003ewebhook delete all` 删除所有 webhook\n- `hwamei\u003ewebhook delete {token}` 删除一个 webhook\n- `hwamei\u003ewebhook update {token} {name|type|chat_id} to {value}` 修改一个 webhook\n- `hwamei\u003ewebhook backup` 备份 webhooks 到 ./data/webhooks.json\n- `hwamei\u003ewebhook restore` 恢复 webhooks\n\n### webhook 使用\n\n1. 先创建 webhook\n  - `hwamei\u003ewebhook create test_incoming_webhook from incoming to test`\n  - 上面命令会创建一个名为 test_incoming_webhook 的 webhook，接收 incoming 类型的输入，输出到 test 企业微信群\n  - 运行命令后系统会输出 webhook url，像这个 url 发送请求即可触发 webhook\n  - `There is your webhook url: /incoming/408dcc98-60a6-4a10-8c77-4679dd9a0a40`\n2. 测试 webhook\n  - `shell\u003ecurl -XPOST http://localhost:8080/incoming/408dcc98-60a6-4a10-8c77-4679dd9a0a40 -H 'Content-type: application/json' -d '{ \"message\": \"hello hwamei\" }'`\n  - 运行上面的命令，正常情况下你的企业微信群应该就收到消息了\n3. 目前支持下列几种类型的 webhook type\n  - incoming \n    - `{ \"message\": \"hello hwamei\" }`\n    - `{ \"text\": \"hello hwamei\" }`\n  - sentry\n  - gitlab\n  - github\n\n## 扩展更多命令\n\n查看 https://github.com/hubotio/hubot/blob/master/docs/scripting.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlikai%2Fhwamei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlikai%2Fhwamei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlikai%2Fhwamei/lists"}