api - Gitlab API未在提交的构建状态中显示所有属性
问题描述
我正在使用curl
gitlab 文档中给出的简单命令,将构建状态发布到提交。
但在 gitlab build status 它只显示:
“abc 的管道 #20 失败.....”
即使我传递“描述”、“target_url”属性。
我努力了,
curl --request POST --header "PRIVATE-TOKEN: 9ko..." " https://gitlab.example.com/api/v4/projects/17/statuses/18f3...?state=failed&description=my_decsription&target_url= http://example.org/link "
从curl
终端的输出中,它成功地传递了所有属性。但在 gitlab build status 它只显示,
“abc 的管道 #20 失败.....”。
我希望输出像,
“ abc 的管道 #20 失败..... my_description http://example.org/link ”。
或
任何其他支持“description”和“target_url”属性的格式。
我在互联网上搜索但没有成功。我正在使用 gitlab 8.16。
我需要在 gitlab 中添加/配置什么吗?
更新:
实际上,我指定的“target_url”显示为构建选项卡的特定内部版本号的超链接。但没有出现在我想要的地方。
“描述”没有出现在任何地方。
解决方案
当您单击构建状态标签时,参数似乎target_url
只会影响您发送到的链接(见下图)。要显示它,您还需要手动将其添加到description
:
curl --request POST --header "PRIVATE-TOKEN: XXXXXX" "https://gitlab.com/api/v4/projects/XXXXXX/statuses/67814f7489214e91738680b433679224993dc1c4?state=failed&name=some_label&description=some%20useful%20description_of_failure%20http://www.google.com&target_url=http://www.google.com"
如果您想查看描述,您必须进入提交详细信息并将鼠标悬停在构建状态标签上:
推荐阅读
- laravel - 如何正确设置内部 laravel 网站消息数据库
- python - 使用 PyODBC 创建 Apache Drill Tables
- ssh - 如何使用带有 ssh 的 -t 标志的 gcloud compute ssh?
- javascript - 编辑路径剪辑以正确方式填充 svg
- python - 使用 orderby 并提供函数在 django 中排序查询集过滤器
- regex - Loadrunner,无效的正则表达式,为什么?
- html - VBA Excel 数据抓取
- python - 更改键值对并将其添加到python中的字典
- c - 为什么我的基本情况会(错误地)立即触发?
- python - 大型逻辑表达式的 sympy simplfiy_logic 替代方案?