mirror of
https://code.forgejo.org/forgejo/download-artifact
synced 2025-03-14 18:59:53 +00:00
Compare commits
No commits in common. "v4" and "main" have entirely different histories.
1 changed files with 6 additions and 2 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -3067,7 +3067,11 @@ function getResultsServiceUrl() {
|
||||||
}
|
}
|
||||||
exports.getResultsServiceUrl = getResultsServiceUrl;
|
exports.getResultsServiceUrl = getResultsServiceUrl;
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
return false;
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||||
|
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||||
|
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
||||||
|
return !isGitHubHost && !isGheHost;
|
||||||
}
|
}
|
||||||
exports.isGhes = isGhes;
|
exports.isGhes = isGhes;
|
||||||
function getGitHubWorkspaceDir() {
|
function getGitHubWorkspaceDir() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue