{"id":15374345,"url":"https://github.com/yurunsoft/rust-webhook","last_synced_at":"2025-04-15T15:11:21.276Z","repository":{"id":65006688,"uuid":"580322547","full_name":"Yurunsoft/rust-webhook","owner":"Yurunsoft","description":"宇润用 Rust 开发的简易 Webhook 服务，支持 Gitee 和 Github。","archived":false,"fork":false,"pushed_at":"2023-02-25T07:55:08.000Z","size":30,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:42:00.316Z","etag":null,"topics":["gitwebhook","rust","webhook"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yurunsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-20T09:23:11.000Z","updated_at":"2025-02-20T08:31:54.000Z","dependencies_parsed_at":"2023-01-11T17:30:40.706Z","dependency_job_id":null,"html_url":"https://github.com/Yurunsoft/rust-webhook","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/Yurunsoft%2Frust-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Frust-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Frust-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Frust-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yurunsoft","download_url":"https://codeload.github.com/Yurunsoft/rust-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094932,"owners_count":21211837,"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":["gitwebhook","rust","webhook"],"created_at":"2024-10-01T13:58:24.409Z","updated_at":"2025-04-15T15:11:21.256Z","avatar_url":"https://github.com/Yurunsoft.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-webhook\n\n![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/yurunsoft/rust-webhook/test.yml?branch=master)\n[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/yurunsoft/rust-webhook/blob/master/LICENSE)\n\n## 介绍\n\nrust-webook 是宇润用 Rust 开发的简易 Webhook 服务，支持 Gitee 和 Github。\n\n可执行文件下载：\u003chttps://github.com/Yurunsoft/rust-webhook/releases\u003e\n\nPHP Swoole 版本：\u003chttps://gitee.com/yurunsoft/swoole-webhook\u003e\n\n\u003e 两个项目的配置文件通用\n\n## 使用说明\n\n### 配置文件\n\n**文件名：** `config.json`\n\n```js\n{\n    // 服务配置\n    \"server\": {\n        \"host\": \"0.0.0.0\", // 主机名\n        \"port\": 12580 // 端口号\n    },\n    // 站点列表\n    \"sites\": {\n        // Gitee 配置\n        \"gitee\": [\n            {\n                \"name\": \"yurunsoft/imi\", // 仓库名称，留空不验证\n                \"password\": \"密码\", // 密码或Secret，留空不验证，但强烈建议配置\n                \"ref\": \"refs/heads/master\", // 分支，留空不验证\n                \"hook_name\": \"push_hooks\", // 动作名称，留空不验证\n                // 执行的命令数组\n                \"cmds\": [\n                    \"git -C /projects/imi pull\",\n                    \"systemctl restart imi\"\n                ]\n            }\n        ],\n        // Github 配置\n        \"github\": [\n            {\n                \"name\": \"yurunsoft/imi\", // 仓库名称\n                \"password\": \"密码\", // 密码或Secret，留空不验证，但强烈建议配置\n                \"ref\": \"refs/heads/master\", // 分支，留空不验证\n                \"hook_name\": \"push_hooks\", // 动作名称，留空不验证\n                // 执行的命令数组\n                \"cmds\": [\n                    \"git -C /projects/imi pull\",\n                    \"systemctl restart imi\"\n                ]\n            }\n        ]\n    }\n}\n```\n\n\u003e 解析 json 使用了 json5，所以可以带上注释。\n\n### 启动服务\n\n`./rust-webhook`\n\n\u003e 工作目录中必须要有 `config.json` 配置文件，否则会报错！\n\n## Q\u0026A\n\n## 为什么要开发这个项目\n\n**回答：** 为了学习 Rust\n\n## 项目是否生产可用\n\n**回答：** 项目逻辑十分简单，并且经过验证，已经生产可用。如有问题欢迎提 issue 和 PR，我会尽快处理。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurunsoft%2Frust-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurunsoft%2Frust-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurunsoft%2Frust-webhook/lists"}