github-doorcat icon indicating copy to clipboard operation
github-doorcat copied to clipboard

Permits to use doorcat on Entreprise Github instance

Open edimitchel opened this issue 4 years ago • 7 comments

Hi @antfu !

I'm working with a self-hosted Enterprise Github instance, is it possible to configurate the endpoint? Instead of github.com, use the custom domain. And this could be a parameter of the webex.

What I see for the moment that should be being customized: https://github.com/antfu/github-doorcat/blob/main/src/background/contentScriptHMR.ts#L13 https://github.com/antfu/github-doorcat/blob/main/src/contentScripts/fetch.ts#L15 https://github.com/antfu/github-doorcat/blob/main/src/contentScripts/fetch.ts#L20

edimitchel avatar Sep 13 '21 08:09 edimitchel

I'll give a try by cloning the repo and try it in dev mode

edimitchel avatar Sep 13 '21 08:09 edimitchel

Could do, but I am mostly concerned about that if Chrome Store allows that 🤔

antfu avatar Sep 13 '21 08:09 antfu

And using the Options page ?

edimitchel avatar Sep 13 '21 09:09 edimitchel

The problem here is the extension permission, which need to be included in the manifest statically, while have */ could make the reviewing much harder.

antfu avatar Sep 13 '21 09:09 antfu

Yes, understood.. :/ And what if it includes github inside the url ?

edimitchel avatar Sep 13 '21 14:09 edimitchel

I see there might be a solution here:

  • https://github.com/sindresorhus/refined-github/blob/32abfaaa4696053fa956f12b0186339e80f19292/distribution/manifest.json#L25-L27
  • https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions
  • https://github.com/sindresorhus/refined-github/issues/3543

image

While I don't have access to a GitHub Enterprise instance, I will need to leave this to you to test out and sending a PR.

antfu avatar Sep 14 '21 07:09 antfu

The package webext-domain-permission-toggle permits it, I will try that

edimitchel avatar Sep 14 '21 08:09 edimitchel