gitlab 上的 Sonarqube 质量徽章 [英] Sonarqube quality badges on gitlab

查看:27
本文介绍了gitlab 上的 Sonarqube 质量徽章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 gitlab 上有一个项目,我正在尝试从 sonarqube 上显示质量徽章.为此,我使用了获取项目徽章".您的 sonarqube 项目概览右下角的按钮.他们为每个徽章给你一个 Markdown,你可以轻松复制和粘贴到 gitlab/github 上的 README.md 文件.

I have a project on gitlab for which I'm trying to display quality badges from sonarqube on. For that I used the "Get project badges" button on the bottom right corner of your sonarqube project overview. They give you for each badge a Markdown which you can easily copy & paste to your README.md file on gitlab/github.

Markdown 看起来像这样:[![Bugs](https://yourprojectonsonarqube/api/project_badges/measure?project=your_project_key&metric=bugs)](https://yourprojectonsonarqube/dashboard?id=your_project_key)

Markdown looks like this: [![Bugs](https://yourprojectonsonarqube/api/project_badges/measure?project=your_project_key&metric=bugs)](https://yourprojectonsonarqube/dashboard?id=your_project_key)

对我来说,在 README.md 文件中看起来像这样(以维护者身份登录):

For me it looks like this on the README.md file(logged in as maintainer):

对于项目中也具有维护者或开发者权限的其他用户,如下所示:

For other users on the project which also have maintainer or developer permissions it looks like this:

如果您单击丢失的图像,它会将您重定向到 sonarqube 并要求您登录.然后图像可见.我该如何改变呢?我希望它们始终对我项目的每个用户可见.

If you click on the missing images, it will redirect you to sonarqube and ask for you to log in. Afterwards the images are visible. How can I change that? I want them to always be visible to every user of my project.

推荐答案

如果这是针对 SonarQube 上的私人项目,这很可能是权限问题.

If this is for a private project on SonarQube, this is most likely a permissions issue.

SonarQube 目前存在一个未解决的问题,允许其工作:https://jira.sonarsource.com/browse/MMF-1942

There is currently an open issue for SonarQube to allow this to work: https://jira.sonarsource.com/browse/MMF-1942

仅供参考,SonarCloud 已经实现了此功能:https://jira.sonarsource.com/browse/MMF-1178.

As an FYI, this feature has already been implemented for SonarCloud: https://jira.sonarsource.com/browse/MMF-1178.

这篇关于gitlab 上的 Sonarqube 质量徽章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆