Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
f92ff84d
提交
f92ff84d
编辑于
1 year ago
作者:
Lorena Ciutacu
提交者:
Marcin Sedlak-Jakubowski
1 year ago
浏览文件
操作
下载
补丁
差异文件
Update badges tasks
上级
ca0f9aa0
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
doc/user/project/badges.md
+38
-39
38 个添加, 39 个删除
doc/user/project/badges.md
有
38 个添加
和
39 个删除
doc/user/project/badges.md
+
38
−
39
浏览文件 @
f92ff84d
...
...
@@ -126,26 +126,6 @@ If you set an out of range value, GitLab automatically adjusts it to the default
Badges can be added to a project by Maintainers or Owners, and are visible on the project's overview page.
If you find that you have to add the same badges to several projects, you may want to add them at the
[
group level
](
#group-badges
)
.
### Add a badge to a project
To add a new badge to a project:
1.
On the left sidebar, select
**Search or go to**
and find your project.
1.
Select
**Settings > General**
.
1.
Expand
**Badges**
.
1.
Select
**Add badge**
.
1.
Under
**Link**
, enter the URL that the badges should point to.
1.
Under
**Badge image URL**
, enter the URL of the image that should be displayed.
1.
Select
**Add badge**
.
After adding a badge to a project, you can see the badge in the list below the form.
### Edit or delete a project badge
To edit a badge, select
**Edit**
(
**{pencil}**
).
To delete a badge, select
**Delete**
(
**{remove}**
).
### Example project badge: Pipeline Status
A common project badge presents the GitLab CI pipeline status.
...
...
@@ -177,26 +157,26 @@ If you need individual badges for each project, either:
-
Add the badge at the
[
project level
](
#project-badges
)
.
-
Use
[
placeholders
](
#placeholders
)
.
##
# Add a badge to a group
##
View badges
To
add a new badge to a
group:
To
view badges available in a project or
group:
1.
On the left sidebar, select
**Search or go to**
and find your group.
1.
On the left sidebar, select
**Search or go to**
and find your
project or
group.
1.
Select
**Settings > General**
.
1.
Expand
**Badges**
.
1.
Under "Link", enter the URL that the badges should point to and under
"Badge image URL" the URL of the image that should be displayed.
1.
Select
**Add badge**
.
After adding a badge to a group, you can see it in the list below the form.
##
# Edit or delete a group
badge
##
Add a
badge
To
edit a badge, select
**Edit**
(
**{pencil}**
).
To
add a new badge to a project or group:
To delete a badge, select
**Delete**
(
**{remove}**
).
Badges associated with a group can be edited or deleted only at the
[
group level
](
#group-badges
)
.
1.
On the left sidebar, select
**Search or go to**
and find your project or group.
1.
Select
**Settings > General**
.
1.
Expand
**Badges**
.
1.
Select
**Add badge**
.
1.
In the
**Name**
text box, enter the name of your badge.
1.
In the
**Link**
text box, enter the URL that the badges should point to.
1.
In the
**Badge image URL**
text box, enter the URL of the image you want to display for the badge.
1.
Select
**Add badge**
.
## View the URL of pipeline badges
...
...
@@ -283,6 +263,31 @@ To add a new badge with a custom image to a group or project:
To learn how to use custom images generated through a pipeline, see the documentation on
[
accessing the latest job artifacts by URL
](
../../ci/jobs/job_artifacts.md#from-a-url
)
.
## Edit a badge
To edit a badge in a project or group:
1.
On the left sidebar, select
**Search or go to**
and find your project or group.
1.
Select
**Settings > General**
.
1.
Expand
**Badges**
.
1.
Next to the badge you want to edit, select
**Edit**
(
**{pencil}**
).
1.
Edit the
**Name**
,
**Link**
, or
**Badge image URL**
.
1.
Select
**Save changes**
.
## Delete a badge
To delete a badge in a project or group:
1.
On the left sidebar, select
**Search or go to**
and find your project or group.
1.
Select
**Settings > General**
.
1.
Expand
**Badges**
.
1.
Next to the badge you want to delete, select
**Delete**
(
**{remove}**
).
1.
On the confirmation dialog, select
**Delete badge**
.
1.
Select
**Save changes**
.
NOTE:
Badges associated with a group can be edited or deleted only at the
[
group level
](
#group-badges
)
.
## Placeholders
Both the URL a badge points to and the image URL can contain placeholders,
...
...
@@ -302,9 +307,3 @@ Placeholders allow badges to expose otherwise-private information, such as the
default branch or commit SHA when the project is configured to have a private
repository. This behavior is intentional, as badges are intended to be used publicly. Avoid
using these placeholders if the information is sensitive.
## Configure badges through the API
You can also configure badges via the GitLab API. As in the settings, there is
a distinction between endpoints for badges at the
[
project level
](
../../api/project_badges.md
)
and
[
group level
](
../../api/group_badges.md
)
.
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录