mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-20 04:58:52 +00:00
Update meta data of docs
This commit is contained in:
@@ -1,18 +1,9 @@
|
||||
---
|
||||
date: "2016-12-01T16:00:00+02:00"
|
||||
title: "Webhooks"
|
||||
slug: "webhooks"
|
||||
sidebar_position: 30
|
||||
toc: false
|
||||
draft: false
|
||||
aliases:
|
||||
- /zh-cn/webhooks
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "Webhooks"
|
||||
sidebar_position: 30
|
||||
identifier: "webhooks"
|
||||
---
|
||||
|
||||
# Webhooks
|
||||
@@ -31,9 +22,13 @@ Gitea支持用于仓库事件的Webhooks。这可以在仓库管理员在设置
|
||||
- Wechatwork(企业微信)
|
||||
- Packagist
|
||||
|
||||
### 事件信息
|
||||
## 事件信息
|
||||
|
||||
**警告**:自 Gitea 1.13.0 版起,payload 中的 `secret` 字段已被弃用,并将在 1.14.0 版中移除:https://github.com/go-gitea/gitea/issues/11755
|
||||
:::warning
|
||||
|
||||
自 Gitea 1.13.0 版起,payload 中的 `secret` 字段已被弃用,并将在 1.14.0 版中移除:https://github.com/go-gitea/gitea/issues/11755
|
||||
|
||||
:::
|
||||
|
||||
以下是 Gitea 将发送给 payload URL的事件信息示例:
|
||||
|
||||
@@ -117,7 +112,7 @@ X-Gitea-Event: push
|
||||
}
|
||||
```
|
||||
|
||||
### 示例
|
||||
## 示例
|
||||
|
||||
这是一个示例,演示如何使用 Webhooks 在推送请求到达仓库时运行一个 php 脚本。
|
||||
在你的仓库设置中,在 Webhooks 下,设置一个如下的 Gitea webhook:
|
||||
@@ -189,6 +184,6 @@ if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
|
||||
在 Webhook 设置中有一个“测试推送(Test Delivery)”按钮,可以测试配置,还有一个“最近推送记录(Recent Deliveries)”的列表。
|
||||
|
||||
### 授权头(Authorization header)
|
||||
## 授权头(Authorization header)
|
||||
|
||||
**从1.19版本开始**,Gitea 的 Webhook 可以配置为向 Webhook 目标发送一个 [授权头(authorization header)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization)。
|
||||
|
||||
Reference in New Issue
Block a user