File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ func main() {
204204 host := pairs ["host" ]
205205 looksLikeGitLab := strings .HasPrefix (host , "gitlab." ) || strings .Contains (pairs ["wwwauth[]" ], `realm="GitLab"` )
206206 looksLikeGitea := strings .HasPrefix (host , "gitea." ) || strings .Contains (pairs ["wwwauth[]" ], `realm="Gitea"` )
207+ looksLikeForgejo := strings .HasPrefix (host , "forgejo." ) || strings .Contains (pairs ["wwwauth[]" ], `realm="Forgejo"` )
207208 looksLikeGitHub := strings .HasPrefix (host , "github." ) || strings .Contains (pairs ["wwwauth[]" ], `realm="GitHub"` )
208209 urll := fmt .Sprintf ("%s://%s" , pairs ["protocol" ], host )
209210 c , found := configByHost [host ]
@@ -223,7 +224,7 @@ func main() {
223224 }
224225 c .Scopes = configByHost ["gitlab.com" ].Scopes
225226 }
226- if ! found && looksLikeGitea {
227+ if ! found && ( looksLikeGitea || looksLikeForgejo ) {
227228 c .ClientID = "a4792ccc-144e-407e-86c9-5e7d8d9c3269"
228229 c .Endpoint = oauth2.Endpoint {
229230 AuthURL : fmt .Sprintf ("%s/login/oauth/authorize" , urll ),
You can’t perform that action at this time.
0 commit comments