Skip to content

Fix default branch, auth, error handling; pin deps; add CI - #16

Merged
peterus merged 3 commits into
mainfrom
fix/review-findings
Nov 16, 2026
Merged

peterus merged 3 commits into
mainfrom
fix/review-findings

Conversation

@peterus

@peterus peterus commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Fixes

  • Pull Request not opened #9 PRs werden gegen default_branch des Repos geöffnet statt nur master/main zu erraten
  • Argument login_or_token is deprecated #13 Github(auth=Auth.Token(...)) statt deprecated login_or_token
  • Still doesn't work if project is in subpath #3 README: permissions: im Beispiel, Hinweis auf „Allow GitHub Actions to create and approve pull requests", GITHUB_TOKEN-PRs triggern keine CI
  • Fehler bei einem Paket bricht nicht mehr den ganzen Lauf ab; nach jedem Paket zurück auf den Start-Ref, am Ende Exit 1 wenn etwas fehlschlug
  • platformio.ini-Update matcht nur ganze Paketnamen/Versionen (ArduinoJson ≠ MyArduinoJson, ^6.21.3 ≠ ^6.21.30), leere Requirements crashen nicht mehr, Datei wird nur bei Änderung geschrieben
  • GitHub-Client einmal erzeugen, get_branch() statt zweimal alle Branches zu paginieren; stabile PR-Reihenfolge
  • GITHUB_WORKSPACE statt hartkodiertem /github/workspace; unbenutzte Docker-args entfernt

Infra

  • requirements.txt gepinnt (Code nutzt interne PlatformIO-APIs)
  • Dependabot: weekly, pip gruppiert, Docker-Base-Image (nur Python-Patch-Updates)
  • Neuer CI-Workflow: pytest + Docker-Build mit Import-Smoke-Test
  • actions/publish-action per SHA auf v0.4.0 gepinnt statt @main

Test

  • 10 Unit-Tests für update_ini_file
  • Lokal im gebauten Image: echter PlatformIO-Install/Outdated-Check (native + ArduinoJson 6 → 7.4.3) mit lokalem Bare-Remote und gemockter GitHub-API: Branch gepusht, PR gegen default_branch, Checkout danach wieder auf Start-Branch; Fehlerpfad (PR-Erstellung 403) → Fehler geloggt, Exit 1, Arbeitsbaum sauber

Closes #9, closes #13, closes #3

🤖 Generated with Claude Code

peterus and others added 3 commits November 16, 2026 16:56
- Open PRs against the repository's default branch instead of guessing
  master/main (fixes #9)
- Use Auth.Token instead of the deprecated login_or_token (fixes #13)
- Create the GitHub client once, check branches with get_branch()
  instead of paginating all branches twice per package
- Use GITHUB_WORKSPACE instead of a hard-coded repo path
- Keep going when a single package fails, return to the start ref after
  each package and fail the run at the end
- Only match whole package names and versions when updating
  platformio.ini, handle empty requirements, stable PR order
- Drop the unused docker args, exec python from the entrypoint
- Add unit tests for update_ini_file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pin Python dependencies; the action uses internal PlatformIO APIs
  that can break with any release
- Dependabot: weekly, grouped pip updates, watch the Docker base image
  (Python patch updates only)
- CI: run the tests and build the image with an import smoke test
- Pin actions/publish-action to v0.4.0 by SHA instead of @main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@peterus
peterus merged commit 222ff83 into main Nov 16, 2026
2 checks passed
@peterus
peterus deleted the fix/review-findings branch November 16, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Argument login_or_token is deprecated Pull Request not opened Still doesn't work if project is in subpath

1 participant