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: 34 additions & 4 deletions .github/workflows/auto-pr-from-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,42 @@ jobs:
git checkout -b "$BRANCH_NAME"

# List outdated packages
dotnet list QRCoder.Core.sln package --outdated
dotnet list QRCoder.Core.sln package --outdated --format json > outdated-packages.json

# Update packages (this is a simplified approach)
# Update packages using the latest available versions
echo "📦 Updating NuGet packages..."
dotnet add src/Metar.Decoder package --version latest || echo "No updates needed for Metar.Decoder"
dotnet add src/Taf.Decoder package --version latest || echo "No updates needed for Taf.Decoder"
python3 - <<'PY'
import json
import pathlib
import subprocess

data = json.loads(pathlib.Path("outdated-packages.json").read_text())
updates = {}

for project in data.get("projects", []):
project_path = pathlib.Path(project["path"]).resolve()
for framework in project.get("frameworks", []):
for package in framework.get("topLevelPackages", []):
latest = package.get("latestVersion")
requested = package.get("requestedVersion")
if latest and latest != requested:
updates.setdefault(project_path, {})[package["id"]] = latest

for project_path, packages in updates.items():
for package_name, latest_version in sorted(packages.items()):
subprocess.run(
[
"dotnet",
"add",
str(project_path),
"package",
package_name,
"--version",
latest_version,
],
check=True,
)
PY

# Check if there are any changes
if git diff --quiet; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ jobs:
- ✅ Performance Tests

---
*Este PR foi criado automaticamente pelo pipeline CI/CD*
branch: main
*Este PR foi criado automaticamente pelo pipeline CI/CD*
branch: auto-pr/${{ github.ref_name }}
delete-branch: true
draft: false
labels: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
echo "✅ SONNAR_TOKEN is configured"
dotnet sonarscanner begin \
/o:"afonsoft" \
/k:"afonsoft_metar-decoder" \
/k:"afonsoft_QRCoder.Core" \
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.login="$SONAR_TOKEN" \
/d:sonar.scm.provider=git \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
echo "✅ SONNAR_TOKEN is configured"
dotnet sonarscanner begin \
/o:"afonsoft" \
/k:"afonsoft_metar-decoder" \
/k:"afonsoft_QRCoder.Core" \
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.login="${{ secrets.SONNAR_TOKEN }}" \
/d:sonar.scm.provider=git \
Expand Down
Loading