This is an automated email from the ASF dual-hosted git repository. dklco pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-aggregator.git
commit 6c425d645d6ea2786135dd33b8c5c564098a60a9 Author: Dan Klco <[email protected]> AuthorDate: Sat Aug 22 18:12:12 2020 -0400 Adding SonarQube badges for SLING-9682 --- add-badges.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/add-badges.sh b/add-badges.sh index 9e180d8..ac6fecf 100755 --- a/add-badges.sh +++ b/add-badges.sh @@ -107,12 +107,21 @@ function update_badges () { fi fi - COVERAGE_CONTENTS=$(curl -L https://img.shields.io/jenkins/c/https/builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master.svg) - if [[ $COVERAGE_CONTENTS = *"job or coverage not found"* ]]; then + STATUS_CONTENTS=$(curl -L "https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=alert_status") + if [[ $STATUS_CONTENTS = *"Measure has not been found"* ]]; then + echo "No sonarcloud status found for $REPO_NAME" + else + echo "Adding sonarcloud status badge for $REPO_NAME" + LINE=" [](https://sonarcloud.io/dashboard?id=apache_sling-$REPO_NAME)" + prepend + fi + + COVERAGE_CONTENTS=$(curl -L "https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=coverage") + if [[ $COVERAGE_CONTENTS = *"Measure has not been found"* ]]; then echo "No coverage reports found for $REPO_NAME" else echo "Adding coverage badge for $REPO_NAME" - LINE=" [](https://builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master)" + LINE=" [](https://sonarcloud.io/dashboard?id=apache_sling-$REPO_NAME)" prepend fi
