Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: SonarQube Cloud

on:
push:
branches:
- main
pull_request:

permissions: {}

jobs:
sonarqube:
name: SonarQube Cloud Analysis
runs-on: ubuntu-latest
permissions:
contents: read
# Only analyze PRs from the same repository. Limitation of SonarQube Cloud
if: github.event.pull_request.head.repo.fork == false

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
persist-credentials: false

- name: Setup pnpm
uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
with:
node-version-file: ".nvmrc"
cache: true
require-lockfile: true

- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@d209202bc7d53ff1cc128f7f907dac145c9d6ae9 # v8.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gitify.io

[![Netlify Status][netlify-badge]][netlify-deploys] [![Renovate enabled][renovate-badge]][renovate] [![Contributors][contributors-badge]][github] [![OSS License][license-badge]][license]
[![Netlify Status][netlify-badge]][netlify-deploys] [![Renovate enabled][renovate-badge]][renovate] [![Contributors][contributors-badge]][github] [![OSS License][license-badge]][license] [![Quality Gate Status][quality-badge]][quality]

> The source code for our gitify.io website

Expand Down Expand Up @@ -52,3 +52,5 @@ All commands are run from the root of the project, from a terminal:
[license-badge]: https://img.shields.io/github/license/gitify-app/gitify?logo=github
[renovate]: https://github.com/gitify-app/website/issues/15
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovate&logoColor=white
[quality]: https://sonarcloud.io/summary/new_code?id=gitify-app_website
[quality-badge]: https://img.shields.io/sonar/quality_gate/gitify-app_website?server=https%3A%2F%2Fsonarcloud.io&logo=sonarqubecloud
25 changes: 25 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# =====================================================
# SonarCloud
# https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/
# =====================================================
sonar.projectKey=gitify-app_website
sonar.organization=gitify-app
sonar.projectDescription=The source code of gitify.io.


# =====================================================
# Source Configuration
# https://docs.sonarsource.com/sonarcloud/advanced-setup/analysis-scope/
# =====================================================
sonar.sources=./src
sonar.typescript.tsconfigPaths=./tsconfig.json


# =====================================================
# Project Metadata
# https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/sonarscanner-for-npm/configuring/
# =====================================================
sonar.links.homepage=https://gitify.io
sonar.links.ci=https://github.com/gitify-app/website/actions
sonar.links.scm=https://github.com/gitify-app/website
sonar.links.issue=https://github.com/gitify-app/website/issues
Loading