skpm / skpm

💎📦 A utility to build and publish Sketch plugins
MIT License
956 stars 79 forks source link

GitHub Enterprise (GHE) publishing support #172

Open gerrit opened 5 years ago

gerrit commented 5 years ago

We run an internal GHE instance and would like to benefit from skpm's publishing workflow and baked-in auto-updating. Currently, skpm publish doesn't support GHE, in fact a lot of places in the code make the assumption. GHE supports the GitHub REST API, so afaict it should be possible to support internal plugin publication using skpm relatively easily.

We're happy to work on the implementation of this if you'd accept such a patch.

Current state

When running skpm publish minor --repo-url=https://<GHE-HOSTNAME>/user/repo.git the output is ✖ ERROR Error: Missing "repository" field in the package.json. which is pretty unhelpful. Same result if a non-github-dot-com repository field exists in package.json.

Proposed changes

Here's what a path to GHE support might look like:

mathieudutour commented 5 years ago

Happy to accept patches, I do realise that publishing for non-GH repos sucks!

That being said, I'm working (at a Sketch employee) on introducing a plugin registry (a bit like npm) where we will store the different plugin versions so all of the publishing on GitHub hack that we have now will disappear.

simareeno commented 5 years ago

@mathieudutour is it possible to update plugins on GHE now without publishing appcast.xml and zips on public?

mathieudutour commented 5 years ago

No, Sketch needs to be able to access them. Otherwise it would mean building a GHE authentication inside Sketch and I don’t think that’s something we will ever do