# gitee-webhook-python-flask **Repository Path**: htycode/gitee-webhook-python-flask ## Basic Information - **Project Name**: gitee-webhook-python-flask - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-23 - **Last Updated**: 2022-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitee-webhook-python-flask webhook(歪脖钩子)python版, 基于python3.6.7实现webhook脚本自动部署脚本。 #### 采用架构 ``` python3.6.7+flask1.0.2 ``` #### 将配置信息放在.env文件 从`.env_template`拷贝并重命名为`.env`, 将配置信息放在.env文件, 更改为您的`git_path`和`webhook_token`。 其中: - `git_path`: 你要git pull的仓库在服务器上的路径 - `webhook_token`: 接头暗号(密码/安全令牌), 明文 ``` cp .env.example .env ``` #### 用法 ``` $ pip3.6 install pipenv $ cd xwebhook $ pipenv install $ pipenv shell (xwebhook)$ python app.py & # or (xwebhook)$ flask run -h 0.0.0.0 & ``` #### 设置webhook for `gitee`: - URL: http://host:[port]/webhook/gitee/ `我的设置为: http://103.47.46.23:6789/webhook/gitee/` - WebHook 密码: 自定义安全令牌 `我的设置为: 123456` ![输入图片说明](https://images.gitee.com/uploads/images/2021/0823/152621_a4032878_4907517.png "屏幕截图.png") for `gitlab`: - webhook url: http://host:[port]/webhook/gitlab/ - token: 自定义安全令牌