TomerFi / sonar-gitea-plugin

Sonar plugin for updating the pull request conversation with metrics and labeling it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitea SonarQube Plugin

Maintenance

This project is WIP (work in progress), a pre-release.
The idea is a SonarQube plugin that decorates Gitea's pull reqeusts with Quality Gate result metrics,
as well as labeling it as passed or failed.

Installing

 # linux
./mvnw package
 # windows
./mvnw.cmd package

This will create the jar file under the maven's target folder.
Place the created jar file in your SonarQube plugins folder and restart.

Configuring

After restarting, the plugin configuration will be added to administration control panel:

Configuration

TIP:
You can create a designated user in your Gitea instance and call it SonarQube.
Generate the token with that user and give it a very strict password (to prevent abuse).
That will make the comments and labels to be pushed by the SonarQube user and not your own.

How does it work

If configured, the plugin will check if the project's repository is a Gitea repository.
If so, it will push the QualityGate result metrics to the pull request conversation as so:

Comment

With further configuration, the plugin will also label the pull request as so:

Labels

Contributing

As stated earlyer, this is a work in progress.
As such, there is tons of work and any contribution will be gladly accepted.
Please check the CONTRIBUTING.md before contributing.

Code of Conduct

Please check the CODE_OF_CONDUCT.md before opening an issue, a pull request or contributing.

License

MIT License.

About

Sonar plugin for updating the pull request conversation with metrics and labeling it.

License:MIT License


Languages

Language:Java 100.0%