do-not-merge-wip-for-github icon indicating copy to clipboard operation
do-not-merge-wip-for-github copied to clipboard

Does not work with Github enterprise

Open sahilsingla90 opened this issue 10 years ago • 7 comments

sahilsingla90 avatar Aug 25 '15 09:08 sahilsingla90

Good catch!

I don't have an idea, yet. Chrome extension requires target url.

https://github.com/sanemat/do-not-merge-wip-for-github/blob/df5fc2cb3b1912448ce7ff278b34c969fef3280b/app/manifest.json#L22-L24

            "matches": [
                "https://github.com/*/*/pull/*"
            ],

matches: ["*"] is "overkill", I think.

sanemat avatar Aug 25 '15 16:08 sanemat

I think the solution is straight forward. Make the github domain to be specified in the options with default as github.com

sahilsingla90 avatar Aug 25 '15 16:08 sahilsingla90

I prefer a custom build like npm run build -- --matches=https://example.com/* --matches=https://test.com/*. This will append matches to manifest.json.

"matches": [
    "https://github.com/*/*/pull/*",
    "https://example.com/*",
    "https://test.com/*"
],

This keeps matches simple and secure.

sanemat avatar Aug 28 '15 04:08 sanemat

That does make sense, but that would also require additional step for the company to make the custom build and provide it to all the employees, besides explaining how to install a custom built chrome extension which just seems unnecessary. Thus from the viewpoint of usability (and getting the most users to use your extension) makes sense to have it as an option, in my opinion.

sahilsingla90 avatar Aug 29 '15 13:08 sahilsingla90

+1 for this

mckelvin avatar Oct 30 '15 04:10 mckelvin

Theoretically you can set <all_urls> as an optional permission in manifest and dynamically request domain permissions according to those user set in extension options. But Chrome's implementation of optional permission is broken (see here) so AFAIK the only way to do this is to request domain permission for <all_urls> and take care of the injection by yourself.

Justineo avatar Dec 26 '15 16:12 Justineo

+1 for this too

liangway avatar Jan 06 '16 02:01 liangway