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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/blank.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: 📝 Blank Issue
name: Blank Issue
about: Blank Issue
title: 📝 <Insert Title>
title: <Insert Title>
labels:
assignees: ''

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: 📚 Documentation
name: Documentation
about: Add/Improve Documentation
title: 📚 <Insert Title>
title: <Insert Title>
labels: documentation
assignees: ''

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature
name: Feature
about: Add/Implement Feature
title: <Insert Title>
title: <Insert Title>
labels: feature
assignees: ''

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/refactoring.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: 🔧 Refactoring
name: Refactoring
about: Refactor
title: 🔧 <Insert Title>
title: <Insert Title>
labels: refactoring
assignees: ''

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: 🔐 Security Issue
name: Security Issue
about: Fix Security Issue
title: 🔐 <Insert Title>
title: <Insert Title>
labels: security
assignees: ''

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Checklist
# Checklist

* [ ] Have you updated the changelog?
* [ ] Have you updated the cookiecutter-template?
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
run: poetry run -- nox -s project:report -- --format json | tee metrics.json

- name: Upload to sonar
run: poetry run -- nox -s sonar:check -- ${{ secrets.SONAR_TOKEN }}
env:
SONAR_TOKEN: "${{ secrets.SONAR_TOKEN }}"
run: poetry run -- nox -s sonar:check

- name: Upload Artifacts
uses: actions/upload-artifact@v4.6.2
Expand Down
3 changes: 3 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Unreleased

## Security
* #477: Switched `sonar:check` to use `SONAR_TOKEN` from the environment
8 changes: 6 additions & 2 deletions exasol/toolbox/nox/_artifacts.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import json
import os
import re
import shutil
import sqlite3
import sys
from collections.abc import Iterable
from pathlib import Path
from typing import Optional

import nox
from nox import Session
Expand Down Expand Up @@ -186,7 +188,9 @@ def _prepare_coverage_xml(session: Session, source: Path) -> None:
session.run(*command)


def _upload_to_sonar(session: Session, sonar_token: str, config: Config) -> None:
def _upload_to_sonar(
session: Session, sonar_token: Optional[str], config: Config
) -> None:
command = [
"pysonar",
"--sonar-token",
Expand All @@ -208,6 +212,6 @@ def _upload_to_sonar(session: Session, sonar_token: str, config: Config) -> None
@nox.session(name="sonar:check", python=False)
def upload_artifacts_to_sonar(session: Session) -> None:
"""Upload artifacts to sonar for analysis"""
sonar_token = session.posargs[0]
sonar_token = os.getenv("SONAR_TOKEN")
_prepare_coverage_xml(session, PROJECT_CONFIG.source)
_upload_to_sonar(session, sonar_token, PROJECT_CONFIG)
4 changes: 3 additions & 1 deletion exasol/toolbox/templates/github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
run: poetry run -- nox -s artifacts:validate

- name: Upload to sonar
run: poetry run -- nox -s sonar:check -- ${{ secrets.SONAR_TOKEN }}
env:
SONAR_TOKEN: "${{ secrets.SONAR_TOKEN }}"
run: poetry run -- nox -s sonar:check

- name: Generate Report
run: poetry run -- nox -s project:report -- --format json | tee metrics.json
Expand Down
48 changes: 23 additions & 25 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.