Skip to content

Commit 845a5d7

Browse files
authored
Merge pull request #80 from afonsoft/feature/devin-20260712-sonar-quality
Feature/devin 20260712 sonar quality
2 parents f9a1c88 + 85fc3a6 commit 845a5d7

6 files changed

Lines changed: 579 additions & 630 deletions

File tree

.github/workflows/auto-pr-from-main.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,42 @@ jobs:
4545
git checkout -b "$BRANCH_NAME"
4646
4747
# List outdated packages
48-
dotnet list QRCoder.Core.sln package --outdated
48+
dotnet list QRCoder.Core.sln package --outdated --format json > outdated-packages.json
4949
50-
# Update packages (this is a simplified approach)
50+
# Update packages using the latest available versions
5151
echo "📦 Updating NuGet packages..."
52-
dotnet add src/Metar.Decoder package --version latest || echo "No updates needed for Metar.Decoder"
53-
dotnet add src/Taf.Decoder package --version latest || echo "No updates needed for Taf.Decoder"
52+
python3 - <<'PY'
53+
import json
54+
import pathlib
55+
import subprocess
56+
57+
data = json.loads(pathlib.Path("outdated-packages.json").read_text())
58+
updates = {}
59+
60+
for project in data.get("projects", []):
61+
project_path = pathlib.Path(project["path"]).resolve()
62+
for framework in project.get("frameworks", []):
63+
for package in framework.get("topLevelPackages", []):
64+
latest = package.get("latestVersion")
65+
requested = package.get("requestedVersion")
66+
if latest and latest != requested:
67+
updates.setdefault(project_path, {})[package["id"]] = latest
68+
69+
for project_path, packages in updates.items():
70+
for package_name, latest_version in sorted(packages.items()):
71+
subprocess.run(
72+
[
73+
"dotnet",
74+
"add",
75+
str(project_path),
76+
"package",
77+
package_name,
78+
"--version",
79+
latest_version,
80+
],
81+
check=True,
82+
)
83+
PY
5484
5585
# Check if there are any changes
5686
if git diff --quiet; then

.github/workflows/ci-build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ jobs:
312312
- ✅ Performance Tests
313313
314314
---
315-
*Este PR foi criado automaticamente pelo pipeline CI/CD*
316-
branch: main
315+
*Este PR foi criado automaticamente pelo pipeline CI/CD*
316+
branch: auto-pr/${{ github.ref_name }}
317317
delete-branch: true
318318
draft: false
319319
labels: |

.github/workflows/code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
echo "✅ SONNAR_TOKEN is configured"
101101
dotnet sonarscanner begin \
102102
/o:"afonsoft" \
103-
/k:"afonsoft_metar-decoder" \
103+
/k:"afonsoft_QRCoder.Core" \
104104
/d:sonar.host.url="https://sonarcloud.io" \
105105
/d:sonar.login="$SONAR_TOKEN" \
106106
/d:sonar.scm.provider=git \

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
echo "✅ SONNAR_TOKEN is configured"
126126
dotnet sonarscanner begin \
127127
/o:"afonsoft" \
128-
/k:"afonsoft_metar-decoder" \
128+
/k:"afonsoft_QRCoder.Core" \
129129
/d:sonar.host.url="https://sonarcloud.io" \
130130
/d:sonar.login="${{ secrets.SONNAR_TOKEN }}" \
131131
/d:sonar.scm.provider=git \

0 commit comments

Comments
 (0)