Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
d10f271b
提交
d10f271b
编辑于
2 years ago
作者:
Evan Read
提交者:
Russell Dickenson
2 years ago
浏览文件
操作
下载
补丁
差异文件
Cross link between server hooks, system hooks, and file hooks
上级
827f61a7
No related branches found
No related tags found
无相关合并请求
变更
3
隐藏空白变更内容
行内
左右并排
显示
3 个更改的文件
doc/administration/file_hooks.md
+2
-4
2 个添加, 4 个删除
doc/administration/file_hooks.md
doc/administration/server_hooks.md
+2
-1
2 个添加, 1 个删除
doc/administration/server_hooks.md
doc/administration/system_hooks.md
+11
-13
11 个添加, 13 个删除
doc/administration/system_hooks.md
有
15 个添加
和
18 个删除
doc/administration/file_hooks.md
+
2
−
4
浏览文件 @
d10f271b
...
@@ -7,10 +7,8 @@ type: reference
...
@@ -7,10 +7,8 @@ type: reference
# File hooks **(FREE SELF)**
# File hooks **(FREE SELF)**
> Renamed feature from Plugins to File hooks in GitLab 12.8.
Use custom file hooks (not to be confused with
[
server hooks
](
server_hooks.md
)
or
[
system hooks
](
system_hooks.md
)
),
to introduce custom integrations without modifying the GitLab source code.
With custom file hooks, GitLab administrators can introduce custom integrations
without modifying the GitLab source code.
A file hook runs on each event. You can filter events or projects
A file hook runs on each event. You can filter events or projects
in a file hook's code, and create many file hooks as you need. Each file hook is
in a file hook's code, and create many file hooks as you need. Each file hook is
...
...
此差异已折叠。
点击以展开。
doc/administration/server_hooks.md
+
2
−
1
浏览文件 @
d10f271b
...
@@ -9,7 +9,8 @@ disqus_identifier: 'https://docs.gitlab.com/ee/administration/custom_hooks.html'
...
@@ -9,7 +9,8 @@ disqus_identifier: 'https://docs.gitlab.com/ee/administration/custom_hooks.html'
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196051) in GitLab 12.8 replacing Custom Hooks.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196051) in GitLab 12.8 replacing Custom Hooks.
Server hooks run custom logic on the GitLab server. Users can use them to run Git-related tasks such as:
Server hooks (not to be confused with
[
system hooks
](
system_hooks.md
)
or
[
file hooks
](
file_hooks.md
)
) run custom logic
on the GitLab server. You can use them to run Git-related tasks such as:
-
Enforcing specific commit policies.
-
Enforcing specific commit policies.
-
Performing tasks based on the state of the repository.
-
Performing tasks based on the state of the repository.
...
...
此差异已折叠。
点击以展开。
doc/administration/system_hooks.md
+
11
−
13
浏览文件 @
d10f271b
...
@@ -7,7 +7,8 @@ type: reference
...
@@ -7,7 +7,8 @@ type: reference
# System hooks **(FREE SELF)**
# System hooks **(FREE SELF)**
Your GitLab instance can perform HTTP POST requests on the following events:
System hooks (not to be confused with
[
server hooks
](
server_hooks.md
)
or
[
file hooks
](
file_hooks.md
)
) perform HTTP POST
requests and are triggered on the following events:
-
`group_create`
-
`group_create`
-
`group_destroy`
-
`group_destroy`
...
@@ -31,21 +32,18 @@ Your GitLab instance can perform HTTP POST requests on the following events:
...
@@ -31,21 +32,18 @@ Your GitLab instance can perform HTTP POST requests on the following events:
-
`user_update_for_group`
-
`user_update_for_group`
-
`user_update_for_team`
-
`user_update_for_team`
The triggers for most of these are self-explanatory, but
`project_update`
and
The triggers for most of these are self-explanatory, but
`project_update`
and
`project_rename`
require clarification:
`project_rename`
deserve some clarification:
`project_update`
is fired any time
an attribute of a project is changed (including name, description, and tags)
_unless_
the
`path`
attribute is also changed. In that case, a
`project_rename`
is triggered instead (so that, for instance, if all you care about is the
repository URL, you can just listen for
`project_rename`
).
`user_failed_login`
is sent whenever a _blocked_ user attempts to sign in and is
-
`project_update`
triggers when an attribute of a project is changed (including name, description, and tags)
denied access.
**except**
when the
`path`
attribute is also changed.
-
`project_rename`
triggers when an attribute of a project (including
`path`
) is changed. If you only care about the
repository URL, just listen for
`project_rename`
.
System hooks can be used, for example, for logging or changing information in an
`user_failed_login`
is sent whenever a
**blocked**
user attempts to sign in and is denied access.
LDAP server.
In addition to these default events, you can enable triggers for other events,
As an example, use system hooks for logging or changing information in an LDAP server.
such as push events, and disable the
`repository_update`
event
You can also enable triggers for other events, such as push events, and disable the
`repository_update`
event
when you create a system hook.
when you create a system hook.
NOTE:
NOTE:
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录