twodayslate / swift-package-registry

A Swift Package Registry
https://swiftpkg.dev
ISC License
26 stars 6 forks source link

[Feature Request] Allow to update Swift package manually #15

Closed MarcoEidinger closed 4 years ago

MarcoEidinger commented 4 years ago

Repository owners might not be able to install GitHub App (e.g employer restrictions). Still, there should be a way to update Swift package when publishing a new release

Current implementation prohibits this

Swift package will not update automatically unless the GitHub App is installed on the repository.

A solution would be to re-process package information when user add existing package

twodayslate commented 4 years ago

Currently this code is what prohibits the reprocessing. https://github.com/twodayslate/swift-package-registry/blob/master/lib/add.js#L57 There should be a check that the package actually has updates, and if it does, reprocess.

I would consider #13 and #16 blockers for this

MarcoEidinger commented 4 years ago

I can have a look to introduce feature as part of PR but I would need some guidance on how to setup the project for testing. So far I figured out that postgres and a database named spr is required but the details (e.g. what tables, etc. ).

twodayslate commented 4 years ago

Take a look at .env.example. You will need to fill in those environmental variables. Otherwise some defaults will be used. The default PostgreSQL database is spr as seen here.

You'll need to setup your own test GitHub App and personal API key.

The app is based off of probot so the docs might be helpful.

The database should be auto created thanks to sequelize.

twodayslate commented 4 years ago

This should be complete in e685aa00de580db514faeacc7a087e930c2e766e

Let me know if you have any issues