Comments (5)
Added PR #70 for adding the link to SonarQube into the PR comments.
from sonarqube-community-branch-plugin.
Hi I'd like to ask a question. The link the issue about is the dashboard url? Because I'd like to notice that sonar dumps https://github.com/SonarSource/sonarqube/blob/f61e29bce771e56f8d45ad07a235c0399a1a9772/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java#L230 dashboardUrl to report-task.txt file. There is a similar plugin which works with this file and I opened a PR about this dashboardUrl gabrie-allaigre/sonar-gitlab-plugin#268
maybe it would be interesting for you. But I don't see that this plugin used report-task.txt before
from sonarqube-community-branch-plugin.
The summary comment links to the dashboard, the issue comments link to the issue in the file.
from sonarqube-community-branch-plugin.
For the link from Sonarqube to the PR, this functionality is currently provided by Sonarqube core if we set the url
property on the BranchDto, which we don't currently do. This should be do-able in PullRequestPostAnalysisTask
by having the constructor take a DbClient
instance, getting the PullRequestBuildStatusDecorator
to generate the PR URL (I've not yet decided if it's best to do this as a return value on the decorateQualityGateStatus
call, or as another method), and then using something similar to
try (DbSession dbSession = dbClient.openSession(false)) {
BranchDao branchDao = dbClient.branchDao();
Optional<BranchDto> optionalBranchDto = branchDao.selectByPullRequestKey(dbSession, projectAnalysis.getProject().getUuid(), projectAnalysis.getScannerContext().getProperties().get("sonar.pullrequest.key"));
if (optionalBranchDto.isPresent()) {
BranchDto branchDto = optionalBranchDto.get();
DbProjectBranches.PullRequestData.Builder pullRequestDataBuilder = DbProjectBranches.PullRequestData.newBuilder(branchDto.getPullRequestData());
pullRequestDataBuilder.setUrl(url);
branchDto.setPullRequestData(pullRequestDataBuilder.build());
branchDao.upsert(dbSession, branchDto);
}
}
I'll try this out when I get time and get a PR raised.
from sonarqube-community-branch-plugin.
Release in version 1.3.1
from sonarqube-community-branch-plugin.
Related Issues (20)
- How to set MR decoration HOT 2
- Issue with Test Coverage Reporting for Branches on GitLab with Spring Boot 3.3.0 HOT 1
- Add checkrun to last commit in PR instead of merge commit HOT 2
- Incremental analysis not working HOT 2
- Sonarqube 10.2 配置后没有生效
- Pull request analysis does not store the date of analysis HOT 4
- GitLab MR decoration: new stage and job created HOT 1
- Fixed Issues is always shown at 0 on Pull Requests HOT 1
- PR Decorator for GitHub not Visible on PR HOT 2
- Will the request decorator trigger a gitlab merge_request update webhook? HOT 4
- BitBucket PR decorator missing annotations
- Pull request analysis using SARIF reports does not import issues to Sonarqube HOT 1
- Status checks don’t update. HOT 1
- An error occurred when viewing the risk analysis chart. HOT 3
- docker-compose up fails with "can't find gid for group sonarqube: no such group: sonarqube" HOT 2
- Github API is returning 'Expected string or block string, but it was malformed' HOT 22
- {"errors":[{"msg":"Current edition does not support branch feature"}]} HOT 2
- Could not decorate Pull Request on Github - 9.9 LTS support HOT 1
- Scanning master branch fails with SonarQube 10.6 and plugin version 1.22.0 at HOT 2
- Housekeeping feature question HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonarqube-community-branch-plugin.