GithubHelp home page GithubHelp logo

djiwandou / sonar-slack-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomhoag/sonar-slack-plugin

0.0 0.0 0.0 19 KB

SonarQube plugin for Slack notifications

License: MIT License

Java 100.00%

sonar-slack-plugin's Introduction

sonar-slack-plugin

A SonarQube plugin to send notifications to a Slack channel.

Plugin Build & Installation

Build the plugin with mvn clean package. The resulting jar file (in the target directory) must be copied to the SONAR_HOME/extensions/plugins folder and SonarQube must be restarted. (SONAR_HOME on OSX and Linux is likely /opt/sonar)

Tested for sonarqube 5.6

The plugin requires Java 1.8

Plugin Configuration

After you have restarted SonarQube, you can configure the Slack plugin settings either globally or for a project. If you set a global configuration, the settings will become the defaults for all projects. You can override the global settings in each project.

The Slack plugin settings can be configured on the Administration page.

Enabled - When set to false, Slack notifications will not be sent.

Slack Channel - The #channel or @user to which the Slack notification will be sent. Channel names must be prefixed with # and user names must be prefixed with @.

Slack Handle - The handle from which the Slack notifications will be sent. Defaults to SonarQube. But get creative :-)

Slack Hook - The Slack webhook used to send notifications. For more info, please take a look @ https://my.slack.com/services/new/incoming-webhook

Notification Message - The template for the Slack notification. The following variables will be replaced by their values in your message:

Variable Description
$name Project Name
$date Analysis Date
$new Number of new issues
$resolved Number of resolved issues
$total Total number of issues
$newBlockers Number of new Blockers
$blockers Total number of Blockers
$newCritical Number of new Critical issues
$critical Total number of Critical issues
$newMajor Number of new Major issues
$major Total number of Major issues
$newMinor Number of new Minor issues
$minor Total number of Minor issues
$newInfo Number of new Info issues
$info Total number of Info issues
$newCodeSmells Number of new Code Smells
$codeSmells Total number of Code Smells
$nl newline

Attributions

Inspired by https://github.com/dbac2002/sonar-hipchat-plugin

TODO

While the plugin currently works just fine, it is built using classes and methods that have been deprecated in the 5.6 version of the API. This will need updating . . .

sonar-slack-plugin's People

Contributors

tomhoag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.