PHPackages                             cexll/swoole-webhook - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cexll/swoole-webhook

ActiveProject[Utility &amp; Helpers](/categories/utility)

cexll/swoole-webhook
====================

Using WebHooks to automatically pull code

1.0.1(3y ago)67Apache-2.0PHPPHP &gt;=7.2

Since Jul 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cexll/swoole-webhook)[ Packagist](https://packagist.org/packages/cexll/swoole-webhook)[ RSS](/packages/cexll-swoole-webhook/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

swoole-webHook
==============

[](#swoole-webhook)

[![Latest Stable Version](https://camo.githubusercontent.com/f8babb72b820985ef29203ec81136bb4ece872b012bbde3aff07c75ada6787bb/687474703a2f2f706f7365722e707567782e6f72672f6365786c6c2f73776f6f6c652d776562686f6f6b2f76)](https://packagist.org/packages/cexll/swoole-webhook) [![Total Downloads](https://camo.githubusercontent.com/c2f3d9c8a7e5a1c48d24f24470ae3e0bd8aac9cc02afe477effda8471f45ea43/687474703a2f2f706f7365722e707567782e6f72672f6365786c6c2f73776f6f6c652d776562686f6f6b2f646f776e6c6f616473)](https://packagist.org/packages/cexll/swoole-webhook) [![Latest Unstable Version](https://camo.githubusercontent.com/926a20eb224e757a532b66c284f5eb6e90f2f40bde56569eecd9b4f319832024/687474703a2f2f706f7365722e707567782e6f72672f6365786c6c2f73776f6f6c652d776562686f6f6b2f762f756e737461626c65)](https://packagist.org/packages/cexll/swoole-webhook) [![License](https://camo.githubusercontent.com/84640318664e55e1e9124427ab99556d833bd1bddce8b5b20d2c0f8c20103d44/687474703a2f2f706f7365722e707567782e6f72672f6365786c6c2f73776f6f6c652d776562686f6f6b2f6c6963656e7365)](https://packagist.org/packages/cexll/swoole-webhook)

Using WebHooks to automatically pull code

Support
-------

[](#support)

- GitHub
- Gitee

Require
-------

[](#require)

- php &gt;= 7.2
- ext-swoole &gt;= 4.5

Install
-------

[](#install)

```
composer create-project cexll/swoole-webhook
```

Configure
---------

[](#configure)

1. vim `config.json`

```
"server": {
	"ip": "0.0.0.0",
	"port": 9501,
	"mode": 1,  // SWOOLE_BASE=1, SWOOLE_PROCESS=2
	"setting": {
		"worker_num": 1,
		"task_worker_num": 1,
		"task_enable_coroutine": true,
		"daemonize": true // 后台运行
	}
}
```

`server`对应的是`Swoole\Http\Server`的相关配置

- `ip`：IP地址
- `port`：端口
- `mode`：启动模式 `SWOOLE_BASE/SWOOLE_PROCESS`
- `settings`：Server的配置

> 设置 daemonize =&gt; true 时，程序将转入后台作为守护进程运行。长时间运行的服务器端程序必须启用此项。 如果不启用守护进程，当 ssh 终端退出后，程序将被终止运行。

2. `sites`对应的是项目的仓库等信息

分为`github`和`gitee`，`name`是仓库名称，支持多个仓库。

- `secret`/`password`：密钥/密码；`github`使用`secret`，`gitee`的 WebHook 密码使用`password`，签名密钥使用`secret`
- `ref`：分支
- `hook_name`：事件名称；`github`为`push`，`gitee`为`push_hooks`
- `cmds`：需要执行的脚本/命令

```
"sites": {
	"github": [{
		"name": "cexll/swoole-webhook",
		"secret": "password",
		"ref": "refs/heads/master",
		"hook_name": "push",
		"cmds": [
			"git -C /yourpath/project pull"
		]
	}],
	"gitee": [{
		"name": "cexll/swoole-webhook",
		"password": "password",
		"ref": "refs/heads/master",
		"hook_name": "push_hooks",
		"cmds": [
			"git -C /yourpath/project pull"
		]
	}]
}
```

3. 填写WebHook

URL：`http://ip:port/github` or `http://ip:port/gitee`

Secret/PassWord：对应`config.json`中的`secret/password`

Start
-----

[](#start)

```
php run.php
```

License
=======

[](#license)

Apache License Version 2.0,

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~102 days

Total

6

Last Release

1419d ago

Major Versions

0.1.3 → 1.0.02022-08-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26520956?v=4)[ben](/maintainers/cexll)[@cexll](https://github.com/cexll)

---

Top Contributors

[![cexll](https://avatars.githubusercontent.com/u/26520956?v=4)](https://github.com/cexll "cexll (15 commits)")

---

Tags

phpswoolewebhook

### Embed Badge

![Health badge](/badges/cexll-swoole-webhook/health.svg)

```
[![Health](https://phpackages.com/badges/cexll-swoole-webhook/health.svg)](https://phpackages.com/packages/cexll-swoole-webhook)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
