- Services API
- Services API
- List all active services
- Asana
- Assembla
- Atlassian Bamboo CI
- Bugzilla
- Buildkite
- Campfire
- Unify Circuit
- Webex Teams
- Custom Issue Tracker
- Drone CI
- Emails on push
- Confluence service
- External Wiki
- Flowdock
- GitHub
- Hangouts Chat
- HipChat
- Irker (IRC gateway)
- Jira
- Slack slash commands
- Mattermost slash commands
- Packagist
- Pipeline-Emails
- PivotalTracker
- Prometheus
- Pushover
- Redmine
- Slack notifications
- Microsoft Teams
- Mattermost notifications
- JetBrains TeamCity CI
- Jenkins CI
- Jenkins CI (Deprecated) Service
- MockCI
- YouTrack
Services API
- List all active services
- Asana
- Assembla
- Atlassian Bamboo CI
- Bugzilla
- Buildkite
- Campfire
- Unify Circuit
- Webex Teams
- Custom Issue Tracker
- Drone CI
- Emails on push
- Confluence service
- External Wiki
- Flowdock
- GitHub
- Hangouts Chat
- HipChat
- Irker (IRC gateway)
- Jira
- Slack slash commands
- Mattermost slash commands
- Packagist
- Pipeline-Emails
- PivotalTracker
- Prometheus
- Pushover
- Redmine
- Slack notifications
- Microsoft Teams
- Mattermost notifications
- JetBrains TeamCity CI
- Jenkins CI
- Jenkins CI (Deprecated) Service
- MockCI
- YouTrack
Services API
注意:此 API 需要具有维护者或所有者权限的访问令牌
List all active services
在 GitLab 12.7 中引入 .
获取所有活动项目服务的列表.
GET /projects/:id/services
响应示例:
[ { "id": 75, "title": "Jenkins CI", "slug": "jenkins", "created_at": "2019-11-20T11:20:25.297Z", "updated_at": "2019-11-20T12:24:37.498Z", "active": true, "commit_events": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": false, "note_events": true, "confidential_note_events": true, "pipeline_events": true, "wiki_page_events": true, "job_events": true, "comment_on_event_enabled": true } { "id": 76, "title": "Alerts endpoint", "slug": "alerts", "created_at": "2019-11-20T11:20:25.297Z", "updated_at": "2019-11-20T12:24:37.498Z", "active": true, "commit_events": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": true, "note_events": true, "confidential_note_events": true, "pipeline_events": true, "wiki_page_events": true, "job_events": true, "comment_on_event_enabled": true } ]
Asana
Asana-无需电子邮件的团队合作
Create/Edit Asana service
为项目设置 Asana 服务.
该服务将提交消息添加为 Asana 任务的注释. 启用后,将检查提交消息中的 Asana 任务 URL(例如
https://app.asana.com/0/123456/987654
)或以#开头的任务 ID(例如#987654
). 找到的每个任务 ID 都会在其中添加提交注释. 您还可以通过以下消息关闭任务:fix #123456
. 您可以在以下位置找到您的 API 密钥: https : //developers.asana.com/docs/#authentication-basics .
PUT /projects/:id/services/asana
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
api_key |
string | true | 用户 API 令牌. 用户必须有权访问任务,所有评论都将归于该用户. |
restrict_to_branch |
string | false | 以逗号分隔的分支列表,将自动对其进行检查. 保留空白以包括所有分支. |
push_events |
boolean | false | 启用推送事件通知 |
Delete Asana service
删除项目的 Asana 服务.
DELETE /projects/:id/services/asana
Get Asana service settings
获取项目的 Asana 服务设置.
GET /projects/:id/services/asana
Assembla
项目管理软件(源提交端点)
Create/Edit Assembla service
为项目设置 Assembla 服务.
PUT /projects/:id/services/assembla
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | 认证令牌 |
subdomain |
string | false | 子域设置 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Assembla service
删除项目的 Assembla 服务.
DELETE /projects/:id/services/assembla
Get Assembla service settings
获取项目的 Assembla 服务设置.
GET /projects/:id/services/assembla
Atlassian Bamboo CI
持续集成和构建服务器
Create/Edit Atlassian Bamboo CI service
为项目设置 Atlassian Bamboo CI 服务.
您必须在 Bamboo 中设置自动修订标签和存储库触发器.
PUT /projects/:id/services/bamboo
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
bamboo_url |
string | true | 竹根 URL. 例如, https://bamboo.example.com . |
build_key |
string | true | 竹构建计划密钥,如 KEY |
username |
string | true | 具有 API 访问权限的用户(如果适用) |
password |
string | true | 用户密码 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Atlassian Bamboo CI service
删除项目的 Atlassian Bamboo CI 服务.
DELETE /projects/:id/services/bamboo
Get Atlassian Bamboo CI service settings
获取项目的 Atlassian Bamboo CI 服务设置.
GET /projects/:id/services/bamboo
Bugzilla
Bugzilla 问题追踪器
Create/Edit Bugzilla service
为项目设置 Bugzilla 服务.
PUT /projects/:id/services/bugzilla
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
new_issue_url |
string | true | 新发行网址 |
issues_url |
string | true | 发行网址 |
project_url |
string | true | 项目网址 |
description |
string | false | Description |
title |
string | false | Title |
push_events |
boolean | false | 启用推送事件通知 |
Delete Bugzilla Service
删除项目的 Bugzilla 服务.
DELETE /projects/:id/services/bugzilla
Get Bugzilla Service Settings
获取项目的 Bugzilla 服务设置.
GET /projects/:id/services/bugzilla
Buildkite
持续集成和部署
Create/Edit Buildkite service
为项目设置 Buildkite 服务.
PUT /projects/:id/services/buildkite
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | Buildkite 项目 GitLab 令牌 |
project_url |
string | true | https://buildkite.com/example/project |
enable_ssl_verification |
boolean | false | 启用 SSL 验证 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Buildkite service
删除项目的 Buildkite 服务.
DELETE /projects/:id/services/buildkite
Get Buildkite service settings
获取项目的 Buildkite 服务设置.
GET /projects/:id/services/buildkite
Campfire
基于网络的简单实时群聊
Create/Edit Campfire service
为项目设置篝火服务.
PUT /projects/:id/services/campfire
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | 篝火令牌 |
subdomain |
string | false | 篝火子域 |
room |
string | false | 篝火室 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Campfire service
删除项目的 Campfire 服务.
DELETE /projects/:id/services/campfire
Get Campfire service settings
获取项目的 Campfire 服务设置.
GET /projects/:id/services/campfire
Unify Circuit
统一电路 RTC 和协作工具.
Create/Edit Unify Circuit service
为项目设置”统一电路”服务.
PUT /projects/:id/services/unify-circuit
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | 统一电路网络挂钩. 例如, https://circuit.com/rest/v2/webhooks/incoming/... |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
push_events |
boolean | false | 启用推送事件通知 |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | 启用笔记事件通知 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
Delete Unify Circuit service
删除项目的统一电路服务.
DELETE /projects/:id/services/unify-circuit
Get Unify Circuit service settings
获取项目的统一电路服务设置.
GET /projects/:id/services/unify-circuit
Webex Teams
Webex Teams 协作工具.
Create/Edit Webex Teams service
为项目设置 Webex Teams 服务.
PUT /projects/:id/services/webex-teams
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | Webex Teams Webhook. 例如, https://api.ciscospark.com/v1/webhooks/incoming/... |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
push_events |
boolean | false | 启用推送事件通知 |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | 启用笔记事件通知 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
Delete Webex Teams service
删除项目的 Webex Teams 服务.
DELETE /projects/:id/services/webex-teams
Get Webex Teams service settings
获取项目的 Webex Teams 服务设置.
GET /projects/:id/services/webex-teams
Custom Issue Tracker
自定义问题跟踪器
Create/Edit Custom Issue Tracker service
为项目设置自定义问题跟踪服务.
PUT /projects/:id/services/custom-issue-tracker
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
new_issue_url |
string | true | 新发行网址 |
issues_url |
string | true | 发行网址 |
project_url |
string | true | 项目网址 |
description |
string | false | Description |
title |
string | false | Title |
push_events |
boolean | false | 启用推送事件通知 |
Delete Custom Issue Tracker service
删除项目的自定义问题跟踪服务.
DELETE /projects/:id/services/custom-issue-tracker
Get Custom Issue Tracker service settings
获取项目的自定义问题跟踪服务设置.
GET /projects/:id/services/custom-issue-tracker
Drone CI
Drone 是一个基于 Go 编写的基于 Docker 的持续集成平台
Create/Edit Drone CI service
为项目设置 Drone CI 服务.
PUT /projects/:id/services/drone-ci
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | 无人机 CI 项目专用令牌 |
drone_url |
string | true | http://drone.example.com |
enable_ssl_verification |
boolean | false | 启用 SSL 验证 |
push_events |
boolean | false | 启用推送事件通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
Delete Drone CI service
删除项目的 Drone CI 服务.
DELETE /projects/:id/services/drone-ci
Get Drone CI service settings
获取项目的 Drone CI 服务设置.
GET /projects/:id/services/drone-ci
Emails on push
通过电子邮件将每次推送的提交和差异发送到收件人列表.
Create/Edit Emails on push service
在项目的推送服务上设置电子邮件.
PUT /projects/:id/services/emails-on-push
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
recipients |
string | true | 用空格分隔的电子邮件 |
disable_diffs |
boolean | false | 禁用代码差异 |
send_from_committer_email |
boolean | false | 从提交者发送 |
push_events |
boolean | false | 启用推送事件通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected”. 推送标签会始终触发通知. |
Delete Emails on push service
删除项目的推送服务电子邮件.
DELETE /projects/:id/services/emails-on-push
Get Emails on push service settings
获取有关项目的推送服务设置的电子邮件.
GET /projects/:id/services/emails-on-push
Confluence service
版本历史
- 在 GitLab 13.2 中引入 .
将到内部 Wiki 的链接替换为到 Confluence Cloud Workspace 的链接.
Create/Edit Confluence service
为项目设置 Confluence 服务.
PUT /projects/:id/services/confluence
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
confluence_url |
string | true | Confluence Cloud Workspace 的 URL 托管在 atlassian.net 上. |
Delete Confluence service
删除项目的 Confluence 服务.
DELETE /projects/:id/services/confluence
Get Confluence service settings
获取项目的 Confluence 服务设置.
GET /projects/:id/services/confluence
External Wiki
将指向内部 Wiki 的链接替换为指向外部 Wiki 的链接.
Create/Edit External Wiki service
为项目设置外部 Wiki 服务.
PUT /projects/:id/services/external-wiki
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
external_wiki_url |
string | true | 外部 Wiki 的 URL |
Delete External Wiki service
删除项目的外部 Wiki 服务.
DELETE /projects/:id/services/external-wiki
Get External Wiki service settings
获取项目的外部 Wiki 服务设置.
GET /projects/:id/services/external-wiki
Flowdock
Flowdock 是面向技术团队的协作 Web 应用程序.
Create/Edit Flowdock service
为项目设置 Flowdock 服务.
PUT /projects/:id/services/flowdock
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | Flowdock Git 源令牌 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Flowdock service
删除项目的 Flowdock 服务.
DELETE /projects/:id/services/flowdock
Get Flowdock service settings
获取项目的 Flowdock 服务设置.
GET /projects/:id/services/flowdock
GitHub
代码协作软件.
Create/Edit GitHub service
为项目设置 GitHub 服务.
PUT /projects/:id/services/github
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | 具有repo:status OAuth 范围的 GitHub API 令牌 |
repository_url |
string | true | GitHub 存储库 URL |
static_context |
boolean | false | 将实例名称而不是分支附加到状态检查名称 |
Delete GitHub service
删除项目的 GitHub 服务.
DELETE /projects/:id/services/github
Get GitHub service settings
获取项目的 GitHub 服务设置.
GET /projects/:id/services/github
Hangouts Chat
Google GSuite 团队协作工具.
Create/Edit Hangouts Chat service
为项目设置环聊聊天服务.
PUT /projects/:id/services/hangouts-chat
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | Hangouts 即时通讯网路挂钩. 例如, https://chat.googleapis.com/v1/spaces... |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
notify_only_default_branch |
boolean | false | 已弃用:此参数已替换为branches_to_be_notified |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
push_events |
boolean | false | 启用推送事件通知 |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | Enable notifications for confidential issue events |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | 启用笔记事件通知 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
Delete Hangouts Chat service
删除项目的环聊聊天服务.
DELETE /projects/:id/services/hangouts-chat
Get Hangouts Chat service settings
获取项目的环聊聊天服务设置.
GET /projects/:id/services/hangouts-chat
HipChat
私人群聊和即时消息
Create/Edit HipChat service
为项目设置 HipChat 服务.
PUT /projects/:id/services/hipchat
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | 房间代币 |
color |
string | false | 房间颜色 |
notify |
boolean | false | 启用通知 |
room |
string | false | 房间名称或 ID |
api_version |
string | false | 默认保留空白(v2) |
server |
string | false | 默认保留空白. 例如, https://hipchat.example.com . |
push_events |
boolean | false | 启用推送事件通知 |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | Enable notifications for note events |
confidental_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
Delete HipChat service
删除项目的 HipChat 服务.
DELETE /projects/:id/services/hipchat
Get HipChat service settings
获取项目的 HipChat 服务设置.
GET /projects/:id/services/hipchat
Irker (IRC gateway)
通过 Irker 网关在更新后将 IRC 消息发送到收件人列表.
Create/Edit Irker (IRC gateway) service
为项目设置 Irker(IRC 网关)服务.
Irker 没有内置的身份验证,如果托管在防火墙外部,则容易受到 IRC 垃圾邮件的攻击. 请确保在安全的网络中运行守护程序,以防止滥用. 有关更多详细信息,请阅读: http : //www.catb.org/~esr/irker/security.html .
PUT /projects/:id/services/irker
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
recipients |
string | true | 用空格分隔的收件人/渠道 |
default_irc_uri |
string | false | irc://irc.network.net:6697/ |
server_host |
string | false | localhost |
server_port |
integer | false | 6659 |
colorize_messages |
boolean | false | 为邮件着色 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Irker (IRC gateway) service
删除项目的 Irker(IRC 网关)服务.
DELETE /projects/:id/services/irker
Get Irker (IRC gateway) service settings
Get Irker (IRC gateway) service settings for a project.
GET /projects/:id/services/irker
Jira
吉拉问题追踪器.
Get Jira service settings
获取项目的 Jira 服务设置.
GET /projects/:id/services/jira
Create/Edit Jira service
为项目设置 Jira 服务.
与 GitLab 8.14 开始,
api_url
,issues_url
,new_issue_url
和project_url
被替换url
. 如果您使用的是旧版本,请遵循此文档 .
PUT /projects/:id/services/jira
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
url |
string | yes | 链接到该 GitLab 项目的 Jira 项目的 URL. 例如, https://jira.example.com . |
api_url |
string | no | Jira 实例 API 的基本 URL. 如果未设置,将使用 Web URL 值. 例如, https://jira-api.example.com . |
username |
string | yes | 创建用于 GitLab / Jira 的用户的用户名. |
password |
string | yes | 创建的用于 GitLab / Jira 的用户密码. |
active |
boolean | no | 激活或停用服务. 默认为 false(停用). |
jira_issue_transition_id |
string | no | 将问题移到关闭状态的过渡的 ID. 您可以在 Jira 工作流管理( 管理>问题>工作流 )下找到该编号,方法是在所需项目工作流的” 操作 “下选择” 查看 “ . 每个状态的 ID 可以在” 转换(id)”列下每个转换名称的括号内找到. 默认情况下,此 ID 设置为2 . |
commit_events |
boolean | false | 启用提交事件通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
comment_on_event_enabled |
boolean | false | 在每个 GitLab 事件(提交/合并请求)的 Jira 问题中启用评论 |
Delete Jira service
从项目中删除所有以前的 Jira 设置.
DELETE /projects/:id/services/jira
Slack slash commands
能够从 Slack 聊天实例接收斜线命令.
Get Slack slash command service settings
获取项目的 Slack 斜杠命令服务设置.
GET /projects/:id/services/slack-slash-commands
响应示例:
{ "id": 4, "title": "Slack slash commands", "slug": "slack-slash-commands", "created_at": "2017-06-27T05:51:39-07:00", "updated_at": "2017-06-27T05:51:39-07:00", "active": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": true, "note_events": true, "job_events": true, "pipeline_events": true, "comment_on_event_enabled": false, "properties": { "token": "<your_access_token>" } }
Create/Edit Slack slash command service
为项目设置 Slack 斜杠命令.
PUT /projects/:id/services/slack-slash-commands
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | yes | Slack 令牌 |
Delete Slack slash command service
删除项目的 Slack 斜杠命令服务.
DELETE /projects/:id/services/slack-slash-commands
Mattermost slash commands
能够从 Mattermost 聊天实例接收斜线命令.
Get Mattermost slash command service settings
获取项目的 Mattermost 斜杠命令服务设置.
GET /projects/:id/services/mattermost-slash-commands
Create/Edit Mattermost slash command service
为项目设置 Mattermost 斜杠命令.
PUT /projects/:id/services/mattermost-slash-commands
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | yes | 最重要的令牌 |
username |
string | no | 用于发布消息的用户名 |
Delete Mattermost slash command service
删除项目的 Mattermost 斜杠命令服务.
DELETE /projects/:id/services/mattermost-slash-commands
Packagist
当提交或标签被推送到 GitLab 时,在 Packagist(主要的 Composer 存储库)上更新您的项目.
Create/Edit Packagist service
为项目设置 Packagist 服务.
PUT /projects/:id/services/packagist
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
username |
string | yes | Packagist 帐户的用户名 |
token |
string | yes | Packagist 服务器的 API 令牌 |
server |
boolean | no | Packagist 服务器的 URL. 默认保留空白: https : //packagist.org |
push_events |
boolean | false | 启用推送事件通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
Delete Packagist service
删除项目的 Packagist 服务.
DELETE /projects/:id/services/packagist
Get Packagist service settings
获取项目的 Packagist 服务设置.
GET /projects/:id/services/packagist
Pipeline-Emails
获取有关 GitLab CI / CD 管道的电子邮件.
Create/Edit Pipeline-Emails service
设置项目的管道电子邮件服务.
PUT /projects/:id/services/pipelines-email
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
recipients |
string | yes | 以逗号分隔的收件人电子邮件地址列表 |
add_pusher |
boolean | no | 将推送器添加到收件人列表 |
notify_only_broken_pipelines |
boolean | no | 仅通知断开的管道 |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
notify_only_default_branch |
boolean | no | 仅针对默认分支发送通知( 在 GitLab 12.0 中引入 ) |
pipeline_events |
boolean | false | 启用管道事件通知 |
Delete Pipeline-Emails service
删除项目的管道电子邮件服务.
DELETE /projects/:id/services/pipelines-email
Get Pipeline-Emails service settings
获取项目的管道电子邮件服务设置.
GET /projects/:id/services/pipelines-email
PivotalTracker
项目管理软件(源提交端点)
Create/Edit PivotalTracker service
为项目设置 PivotalTracker 服务.
PUT /projects/:id/services/pivotaltracker
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | true | PivotalTracker 令牌 |
restrict_to_branch |
boolean | false | 以逗号分隔的分支列表,将自动对其进行检查. 保留空白以包括所有分支. |
push_events |
boolean | false | 启用推送事件通知 |
Delete PivotalTracker service
删除项目的 PivotalTracker 服务.
DELETE /projects/:id/services/pivotaltracker
Get PivotalTracker service settings
获取项目的 PivotalTracker 服务设置.
GET /projects/:id/services/pivotaltracker
Prometheus
Prometheus 是一项功能强大的时间序列监视服务.
Create/Edit Prometheus service
为项目设置 Prometheus 服务.
PUT /projects/:id/services/prometheus
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
api_url |
string | true | Prometheus API 基本 URL. 例如, http://prometheus.example.com/ . |
google_iap_audience_client_id |
string | false | IAP 受保护资源的客户端 ID(看起来像 IAP_CLIENT_ID.apps.googleusercontent.com) |
google_iap_service_account_json |
string | false | 您的服务帐户的credentials.json 文件,例如{“ type”:” service_account”,” project_id”:…} |
Delete Prometheus service
删除项目的 Prometheus 服务.
DELETE /projects/:id/services/prometheus
Get Prometheus service settings
获取项目的 Prometheus 服务设置.
GET /projects/:id/services/prometheus
Pushover
通过 Pushover,可以轻松在 Android 设备,iPhone,iPad 和台式机上获取实时通知.
Create/Edit Pushover service
为项目设置 Pushover 服务.
PUT /projects/:id/services/pushover
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
api_key |
string | true | Your application key |
user_key |
string | true | 您的用户密钥 |
priority |
string | true | 优先事项 |
device |
string | false | 对于所有活动设备保留空白 |
sound |
string | false | 通知的声音 |
push_events |
boolean | false | 启用推送事件通知 |
Delete Pushover service
删除项目的 Pushover 服务.
DELETE /projects/:id/services/pushover
Get Pushover service settings
获取项目的 Pushover 服务设置.
GET /projects/:id/services/pushover
Redmine
Redmine 问题追踪器
Create/Edit Redmine service
为项目设置 Redmine 服务.
PUT /projects/:id/services/redmine
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
new_issue_url |
string | true | 新发行网址 |
project_url |
string | true | 项目网址 |
issues_url |
string | true | 发行网址 |
description |
string | false | Description |
push_events |
boolean | false | 启用推送事件通知 |
Delete Redmine service
删除项目的 Redmine 服务.
DELETE /projects/:id/services/redmine
Get Redmine service settings
获取项目的 Redmine 服务设置.
GET /projects/:id/services/redmine
Slack notifications
在 Slack 中接收事件通知
Create/Edit Slack service
为项目设置 Slack 服务.
PUT /projects/:id/services/slack
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | https://hooks.slack.com/services/... |
username |
string | false | username |
channel |
string | false | 如果未配置其他频道,则使用默认频道 |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
notify_only_default_branch |
boolean | false | 已弃用:此参数已替换为branches_to_be_notified |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
commit_events |
boolean | false | 启用提交事件通知 |
confidential_issue_channel |
string | false | 接收机密问题事件通知的渠道的名称 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
confidential_note_channel |
string | false | 接收机密笔记事件通知的渠道的名称 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
deployment_channel |
string | false | 接收部署事件通知的通道的名称 |
deployment_events |
boolean | false | 启用部署事件通知 |
issue_channel |
string | false | 接收问题事件通知的渠道的名称 |
issues_events |
boolean | false | 启用问题事件通知 |
job_events |
boolean | false | 启用工作事件通知 |
merge_request_channel |
string | false | 接收合并请求事件通知的通道的名称 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
note_channel |
string | false | 接收音符事件通知的频道名称 |
note_events |
boolean | false | 启用笔记事件通知 |
pipeline_channel |
string | false | 接收管道事件通知的通道的名称 |
pipeline_events |
boolean | false | 启用管道事件通知 |
push_channel |
string | false | 接收推送事件通知的通道的名称 |
push_events |
boolean | false | 启用推送事件通知 |
tag_push_channel |
string | false | 接收标签推送事件通知的通道的名称 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
wiki_page_channel |
string | false | 接收维基页面事件通知的频道名称 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
Delete Slack service
删除项目的 Slack 服务.
DELETE /projects/:id/services/slack
Get Slack service settings
获取项目的 Slack 服务设置.
GET /projects/:id/services/slack
Microsoft Teams
群聊软件
Create/Edit Microsoft Teams service
为项目设置 Microsoft Teams 服务.
PUT /projects/:id/services/microsoft-teams
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | Microsoft Teams 网络挂钩. 例如, https://outlook.office.com/webhook/... |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
notify_only_default_branch |
boolean | false | 已弃用:此参数已替换为branches_to_be_notified |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
push_events |
boolean | false | Enable notifications for push events |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | 启用笔记事件通知 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
Delete Microsoft Teams service
删除项目的 Microsoft Teams 服务.
DELETE /projects/:id/services/microsoft-teams
Get Microsoft Teams service settings
获取项目的 Microsoft Teams 服务设置.
GET /projects/:id/services/microsoft-teams
Mattermost notifications
在 Mattermost 接收事件通知
Create/Edit Mattermost notifications service
为项目设置 Mattermost 服务.
PUT /projects/:id/services/mattermost
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
webhook |
string | true | 最重要的网络挂钩. 例如, http://mattermost_host/hooks/... |
username |
string | false | username |
channel |
string | false | 如果未配置其他频道,则使用默认频道 |
notify_only_broken_pipelines |
boolean | false | 发送有关管道中断的通知 |
notify_only_default_branch |
boolean | false | 已弃用:此参数已替换为branches_to_be_notified |
branches_to_be_notified |
string | all | 发送通知的分支. 有效选项为”所有”,”默认”,”受保护”和” default_and_protected” |
push_events |
boolean | false | 启用推送事件通知 |
issues_events |
boolean | false | 启用问题事件通知 |
confidential_issues_events |
boolean | false | 启用机密问题事件的通知 |
merge_requests_events |
boolean | false | 启用合并请求事件的通知 |
tag_push_events |
boolean | false | 启用标签推送事件的通知 |
note_events |
boolean | false | 启用笔记事件通知 |
confidential_note_events |
boolean | false | 启用机密笔记事件的通知 |
pipeline_events |
boolean | false | 启用管道事件通知 |
wiki_page_events |
boolean | false | 启用 Wiki 页面事件的通知 |
push_channel |
string | false | 接收推送事件通知的通道的名称 |
issue_channel |
string | false | 接收问题事件通知的渠道的名称 |
confidential_issue_channel |
string | false | 接收机密问题事件通知的渠道的名称 |
merge_request_channel |
string | false | 接收合并请求事件通知的通道的名称 |
note_channel |
string | false | 接收音符事件通知的频道名称 |
confidential_note_channel |
boolean | 接收机密笔记事件通知的渠道的名称 | |
tag_push_channel |
string | false | 接收标签推送事件通知的通道的名称 |
pipeline_channel |
string | false | 接收管道事件通知的通道的名称 |
wiki_page_channel |
string | false | 接收维基页面事件通知的频道名称 |
Delete Mattermost notifications service
删除项目的 Mattermost Notifications 服务.
DELETE /projects/:id/services/mattermost
Get Mattermost notifications service settings
获取项目的”最重要的通知”服务设置.
GET /projects/:id/services/mattermost
JetBrains TeamCity CI
持续集成和构建服务器
Create/Edit JetBrains TeamCity CI service
为项目设置 JetBrains TeamCity CI 服务.
TeamCity 中的构建配置必须使用构建格式编号
%build.vcs.number%
您还将要配置对所有分支的监视,以便合并请求得以构建,该设置位于 VSC 根高级设置中.
PUT /projects/:id/services/teamcity
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
teamcity_url |
string | true | TeamCity 根 URL. 例如, https://teamcity.example.com |
build_type |
string | true | 构建配置 ID |
username |
string | true | 有权触发手动构建的用户 |
password |
string | true | 用户密码 |
push_events |
boolean | false | 启用推送事件通知 |
Delete JetBrains TeamCity CI service
删除项目的 JetBrains TeamCity CI 服务.
DELETE /projects/:id/services/teamcity
Get JetBrains TeamCity CI service settings
获取项目的 JetBrains TeamCity CI 服务设置.
GET /projects/:id/services/teamcity
Jenkins CI
持续集成和构建服务器
Create/Edit Jenkins CI service
为项目设置 Jenkins CI 服务.
PUT /projects/:id/services/jenkins
Parameters:
jenkins_url
( 必填 )jenkins_url
URL,例如http://jenkins.example.com
project_name
( 必需 )-URL 友好的项目名称. 示例:my_project_nameusername
(可选)-有权访问 Jenkins 服务器的username
(如果适用)password
(可选)-用户的密码
Delete Jenkins CI service
删除项目的 Jenkins CI 服务.
DELETE /projects/:id/services/jenkins
Get Jenkins CI service settings
获取项目的 Jenkins CI 服务设置.
GET /projects/:id/services/jenkins
Jenkins CI (Deprecated) Service
持续集成和构建服务器
Create/Edit Jenkins CI (Deprecated) service
为项目设置 Jenkins CI(不推荐使用)服务.
PUT /projects/:id/services/jenkins-deprecated
Parameters:
project_url
( 必填 )-Jenkins 项目网址,例如http://jenkins.example.com/job/my-project/
multiproject_enabled
(可选)-在 Jenkins GitLab Hook 插件中配置了多项目模式pass_unstable
(可选)-不稳定的版本将被视为通过
Delete Jenkins CI (Deprecated) service
删除项目的 Jenkins CI(不推荐使用)服务.
DELETE /projects/:id/services/jenkins-deprecated
Get Jenkins CI (Deprecated) service settings
获取项目的 Jenkins CI(不推荐使用)服务设置.
GET /projects/:id/services/jenkins-deprecated
MockCI
模拟一个外部配置项. 有关伴随模拟服务的示例,请参见gitlab-org/gitlab-mock-ci-service
service.
仅当您的环境设置为开发时,此服务才可用.
Create/Edit MockCI service
为项目设置 MockCI 服务.
PUT /projects/:id/services/mock-ci
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
mock_service_url |
string | true | http://localhost:4004 |
Delete MockCI service
删除项目的 MockCI 服务.
DELETE /projects/:id/services/mock-ci
Get MockCI service settings
获取项目的 MockCI 服务设置.
GET /projects/:id/services/mock-ci
YouTrack
YouTrack 问题追踪器
Create/Edit YouTrack service
为项目设置 YouTrack 服务.
PUT /projects/:id/services/youtrack
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
issues_url |
string | true | 发行网址 |
project_url |
string | true | 项目网址 |
description |
string | false | Description |
push_events |
boolean | false | 启用推送事件通知 |
Delete YouTrack Service
删除项目的 YouTrack 服务.
DELETE /projects/:id/services/youtrack
Get YouTrack Service Settings
获取项目的 YouTrack 服务设置.
GET /projects/:id/services/youtrack