summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoPlagiarism <37241775+NoPlagiarism@users.noreply.github.com>2023-07-18 02:15:51 +0500
committerGitHub <noreply@github.com>2023-07-17 15:15:51 -0600
commit9104650cfecfb7f6aea42fc755b565f19c79d370 (patch)
tree112b1822858dd560fadbf47ee46bfeddae65507b
parent46c9b664789cc4f03d2ea075bb598ac0702b58e1 (diff)
downloadfarside-9104650cfecfb7f6aea42fc755b565f19c79d370.tar.gz
Add GotHub support (#116)
Adds support for GotHub, an alternative frontend for GitHub --------- Co-authored-by: Ben Busby <contact@benbusby.com>
-rw-r--r--.github/workflows/update-instances.yml12
-rw-r--r--lib/farside.ex2
-rw-r--r--services-full.json14
-rw-r--r--services.json13
4 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml
index 2c043ab..829583b 100644
--- a/.github/workflows/update-instances.yml
+++ b/.github/workflows/update-instances.yml
@@ -217,6 +217,18 @@ jobs:
apply_update
# ==============================================================
+ # GotHub update
+ # ==============================================================
+
+ curl -s https://codeberg.org/gothub/gothub-instances/raw/branch/master/instances.json | \
+ jq '[.[] | .link]' > gothub-tmp.json
+ jq --slurpfile gothub-tmp.json \
+ '(.[] | select(.type == "gothub") )
+ .instances |= $gothub[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
# TODO: Update instances for other services
# ==============================================================
diff --git a/lib/farside.ex b/lib/farside.ex
index e92db93..ca96a4a 100644
--- a/lib/farside.ex
+++ b/lib/farside.ex
@@ -20,6 +20,7 @@ defmodule Farside do
@quora_regex ~r/quora.com|quetre/
@gsearch_regex ~r/google.com\/search|whoogle/
@fandom_regex ~r/fandom.com|breezewiki/
+ @github_regex ~r/github.com|gothub/
@stackoverflow_regex ~r/stackoverflow.com|anonymousoverflow/
@parent_services %{
@@ -37,6 +38,7 @@ defmodule Farside do
@quora_regex => ["quetre"],
@gsearch_regex => ["whoogle"],
@fandom_regex => ["breezewiki"],
+ @github_regex => ["gothub"],
@stackoverflow_regex => ["anonymousoverflow"]
}
diff --git a/services-full.json b/services-full.json
index 85d9a8d..928ec9f 100644
--- a/services-full.json
+++ b/services-full.json
@@ -565,6 +565,20 @@
]
},
{
+ "type": "gothub",
+ "test_url": "/benbusby/farside",
+ "fallback": "https://gothub.projectsegfau.lt",
+ "instances": [
+ "https://gh.bloatcat.tk",
+ "https://gothub.lunar.icu",
+ "https://gothub.no-logs.com",
+ "https://gh.owo.si",
+ "https://gothub.projectsegfau.lt",
+ "https://gh.whateveritworks.org",
+ "https://gothub.dev.projectsegfau.lt"
+ ]
+ },
+ {
"type": "anonymousoverflow",
"test_url": "/questions/6591213/how-do-i-rename-a-local-git-branch",
"fallback": "https://code.whatever.social",
diff --git a/services.json b/services.json
index e58bd84..a015306 100644
--- a/services.json
+++ b/services.json
@@ -521,6 +521,19 @@
]
},
{
+ "type": "gothub",
+ "test_url": "/benbusby/farside",
+ "fallback": "https://gothub.projectsegfau.lt",
+ "instances": [
+ "https://gh.bloatcat.tk",
+ "https://gothub.lunar.icu",
+ "https://gothub.no-logs.com",
+ "https://gh.owo.si",
+ "https://gothub.projectsegfau.lt",
+ "https://gothub.dev.projectsegfau.lt"
+ ]
+ },
+ {
"type": "anonymousoverflow",
"test_url": "/questions/6591213/how-do-i-rename-a-local-git-branch",
"fallback": "https://code.whatever.social",