- better handle homeUrl for enterprise instances with different urls (used by replace pattern for comparison string)
This commit is contained in:
@@ -18,6 +18,10 @@ export class GiteaRepository extends BaseRepository {
|
|||||||
return 'https://gitea.com'
|
return 'https://gitea.com'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get homeUrl(): string {
|
||||||
|
return 'https://gitea.com'
|
||||||
|
}
|
||||||
|
|
||||||
constructor(token: string, url: string | undefined, repositoryPath: string) {
|
constructor(token: string, url: string | undefined, repositoryPath: string) {
|
||||||
super(token, url, repositoryPath)
|
super(token, url, repositoryPath)
|
||||||
this.url = url || this.defaultUrl
|
this.url = url || this.defaultUrl
|
||||||
@@ -237,8 +241,4 @@ export class GiteaRepository extends BaseRepository {
|
|||||||
core.info(`ℹ️ Found ${tagsInfo.length} (fetching max: ${maxTagsToFetch}) tags from the GitHub API for ${owner}/${repo}`)
|
core.info(`ℹ️ Found ${tagsInfo.length} (fetching max: ${maxTagsToFetch}) tags from the GitHub API for ${owner}/${repo}`)
|
||||||
return tagsInfo
|
return tagsInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
get homeUrl(): string {
|
|
||||||
return 'https://gitea.com'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,10 @@ export class GithubRepository extends BaseRepository {
|
|||||||
return 'https://api.github.com'
|
return 'https://api.github.com'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get homeUrl(): string {
|
||||||
|
return this.url?.replace('api.', '') || 'https://github.com'
|
||||||
|
}
|
||||||
|
|
||||||
private octokit: Octokit
|
private octokit: Octokit
|
||||||
|
|
||||||
constructor(token: string, url: string | undefined, repositoryPath: string) {
|
constructor(token: string, url: string | undefined, repositoryPath: string) {
|
||||||
@@ -297,7 +301,4 @@ export class GithubRepository extends BaseRepository {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
get homeUrl(): string {
|
|
||||||
return 'https://github.com'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user