From 93738624ed1dd4473fb4e6cdfb859e6250437104 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 12 Sep 2021 15:58:12 +0530 Subject: Merged 'github_enterprise' recipe into 'github' with the extra bits. --- recipes/github/index.js | 20 +++++++++++++++++++- recipes/github/package.json | 3 ++- recipes/github_entreprise/LICENSE | 21 --------------------- recipes/github_entreprise/icon.svg | 1 - recipes/github_entreprise/index.js | 19 ------------------- recipes/github_entreprise/package.json | 10 ---------- recipes/github_entreprise/webview.js | 0 7 files changed, 21 insertions(+), 53 deletions(-) delete mode 100644 recipes/github_entreprise/LICENSE delete mode 100644 recipes/github_entreprise/icon.svg delete mode 100644 recipes/github_entreprise/index.js delete mode 100644 recipes/github_entreprise/package.json delete mode 100644 recipes/github_entreprise/webview.js (limited to 'recipes') diff --git a/recipes/github/index.js b/recipes/github/index.js index 23607bd..dfcd7d1 100644 --- a/recipes/github/index.js +++ b/recipes/github/index.js @@ -1 +1,19 @@ -module.exports = Ferdi => Ferdi; +module.exports = Ferdi => class GitHub extends Ferdi { + 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; + } +}; diff --git a/recipes/github/package.json b/recipes/github/package.json index 2ed611e..573f743 100644 --- a/recipes/github/package.json +++ b/recipes/github/package.json @@ -1,10 +1,11 @@ { "id": "github", "name": "GitHub", - "version": "2.1.1", + "version": "2.2.0", "license": "MIT", "config": { "serviceURL": "https://github.com/notifications", + "hasCustomUrl": true, "hasIndirectMessages": true } } diff --git a/recipes/github_entreprise/LICENSE b/recipes/github_entreprise/LICENSE deleted file mode 100644 index 33926c0..0000000 --- a/recipes/github_entreprise/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/recipes/github_entreprise/icon.svg b/recipes/github_entreprise/icon.svg deleted file mode 100644 index 87f6f80..0000000 --- a/recipes/github_entreprise/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/github_entreprise/index.js b/recipes/github_entreprise/index.js deleted file mode 100644 index f45d240..0000000 --- a/recipes/github_entreprise/index.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = Ferdi => class GitHubEnterprise extends Ferdi { - 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; - } -}; diff --git a/recipes/github_entreprise/package.json b/recipes/github_entreprise/package.json deleted file mode 100644 index e40d6d3..0000000 --- a/recipes/github_entreprise/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "github_entreprise", - "name": "GitHub Enterprise", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://github.mycompany.com/", - "hasCustomUrl": true - } -} diff --git a/recipes/github_entreprise/webview.js b/recipes/github_entreprise/webview.js deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3-54-g00ecf