File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -71,5 +71,7 @@ type MiseToolInfo = {
7171 tool_options : {
7272 os : string ;
7373 install_env : Record < string , string > ;
74+ api_url ?: string ;
75+ url ?: string ;
7476 } ;
7577} ;
Original file line number Diff line number Diff line change @@ -161,6 +161,32 @@ export const getWebsiteForTool = async (toolInfo: MiseToolInfo) => {
161161 return `https://github.com/${ repoName } ` ;
162162 }
163163
164+ if ( backendName === "github" ) {
165+ if ( toolInfo . tool_options . api_url ) {
166+ const url = new URL ( toolInfo . tool_options . api_url ) ;
167+ return `${ url . protocol } //${ url . hostname } /${ repo } ` ;
168+ }
169+
170+ return `https://github.com/${ repo } ` ;
171+ }
172+
173+ if ( backendName === "gitlab" ) {
174+ if ( toolInfo . tool_options . api_url ) {
175+ const url = new URL ( toolInfo . tool_options . api_url ) ;
176+ return `${ url . protocol } //${ url . hostname } /${ repo } ` ;
177+ }
178+
179+ return `https://gitlab.com/${ repo } ` ;
180+ }
181+
182+ if ( backendName === "http" ) {
183+ if ( toolInfo . tool_options . url ) {
184+ return toolInfo . tool_options . url ;
185+ }
186+
187+ return "https://mise.jdx.dev/dev-tools/backends/http.html" ;
188+ }
189+
164190 if ( backendName === "core" ) {
165191 return `https://mise.jdx.dev/lang/${ repo } ` ;
166192 }
You can’t perform that action at this time.
0 commit comments