From 2f741dd468082ddc01834912dd0cc88fb6a15d3d Mon Sep 17 00:00:00 2001 From: Antoine Aumjaud Date: Fri, 28 Feb 2020 21:10:01 +0100 Subject: Add GitHub Entreprise --- uncompressed/github_entreprise/LICENSE | 21 +++++++++++++++++++++ uncompressed/github_entreprise/README.md | 5 +++++ uncompressed/github_entreprise/icon.png | Bin 0 -> 14107 bytes uncompressed/github_entreprise/icon.svg | 3 +++ uncompressed/github_entreprise/index.js | 21 +++++++++++++++++++++ uncompressed/github_entreprise/package.json | 13 +++++++++++++ uncompressed/github_entreprise/webview.js | 1 + 7 files changed, 64 insertions(+) create mode 100644 uncompressed/github_entreprise/LICENSE create mode 100644 uncompressed/github_entreprise/README.md create mode 100644 uncompressed/github_entreprise/icon.png create mode 100644 uncompressed/github_entreprise/icon.svg create mode 100644 uncompressed/github_entreprise/index.js create mode 100644 uncompressed/github_entreprise/package.json create mode 100644 uncompressed/github_entreprise/webview.js (limited to 'uncompressed') diff --git a/uncompressed/github_entreprise/LICENSE b/uncompressed/github_entreprise/LICENSE new file mode 100644 index 0000000..33926c0 --- /dev/null +++ b/uncompressed/github_entreprise/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Sudhir Ganesan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/uncompressed/github_entreprise/README.md b/uncompressed/github_entreprise/README.md new file mode 100644 index 0000000..101de69 --- /dev/null +++ b/uncompressed/github_entreprise/README.md @@ -0,0 +1,5 @@ +# GitHub Entreprise Franz Plugin + +Follow instructions [here](https://github.com/meetfranz/plugins/blob/master/docs/integration.md) for installation of this plugin. + +Inspired by _GitHub Franz Plugin_: https://github.com/redsox2002/recipe-franz-github diff --git a/uncompressed/github_entreprise/icon.png b/uncompressed/github_entreprise/icon.png new file mode 100644 index 0000000..200ce79 Binary files /dev/null and b/uncompressed/github_entreprise/icon.png differ diff --git a/uncompressed/github_entreprise/icon.svg b/uncompressed/github_entreprise/icon.svg new file mode 100644 index 0000000..146f66f --- /dev/null +++ b/uncompressed/github_entreprise/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/uncompressed/github_entreprise/index.js b/uncompressed/github_entreprise/index.js new file mode 100644 index 0000000..76901cb --- /dev/null +++ b/uncompressed/github_entreprise/index.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = Franz => class GitHubEntreprise extends Franz { + async validateUrl(url) { + try { + const resp = await window.fetch(`${url}/api/v3`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/vnd.github.v3+json' + }, + }); + //doc: https://developer.github.com/enterprise/2.17/v3/#current-version + return resp.status.toString().startsWith('2'); + } catch (err) { + console.error(err); + } + + return false; + } +}; \ No newline at end of file diff --git a/uncompressed/github_entreprise/package.json b/uncompressed/github_entreprise/package.json new file mode 100644 index 0000000..245d655 --- /dev/null +++ b/uncompressed/github_entreprise/package.json @@ -0,0 +1,13 @@ +{ + "id": "github_entreprise", + "name": "GitHub Entreprise", + "version": "1.0.0", + "description": "GitHub Entreprise", + "main": "index.js", + "author": "Antoine Aumjaud", + "license": "MIT", + "config": { + "serviceURL": "https://github.mycompany.com/", + "hasCustomUrl": true + } +} diff --git a/uncompressed/github_entreprise/webview.js b/uncompressed/github_entreprise/webview.js new file mode 100644 index 0000000..3918c74 --- /dev/null +++ b/uncompressed/github_entreprise/webview.js @@ -0,0 +1 @@ +"use strict"; -- cgit v1.2.3-54-g00ecf