Skip to content

pjullrich/pushin-cli

Back Tolerate missing repo-metadata PATCH endpoint on re-import

Commit details

Tolerate missing repo-metadata PATCH endpoint on re-import

Description

pushin.eu has no `PATCH /repos/:owner/:repo` route, so refreshing an existing repo's metadata 404s and made every re-import of an existing repo report a spurious "1 with errors" (and, for batch, a non-zero exit). The create call already returns 422 when the repo exists, so a 404 on the follow-up PATCH means the update route is absent, not the repo. Treat that 404 as "server has no repo-update endpoint" and continue cleanly instead of counting it as a failed item; other errors still surface and count. Covered by a new test that 404s the PATCH and asserts the import stays a clean success with no HTML leaking into the message.

Metadata

Author
Peter Ullrich PJUllrich@users.noreply.github.com
Committed
Commit

Contributors

  • Peter Ullrich PJUllrich@users.noreply.github.com Author
  • Claude Opus 4.8 (1M context) noreply@anthropic.com Co-author