- improve formatting
- add some more comments
This commit is contained in:
+12
-7
@@ -1764,6 +1764,9 @@ class GiteaRepository extends BaseRepository_1.BaseRepository {
|
||||
get defaultUrl() {
|
||||
return 'https://gitea.com';
|
||||
}
|
||||
get homeUrl() {
|
||||
return 'https://gitea.com';
|
||||
}
|
||||
constructor(token, url, repositoryPath) {
|
||||
super(token, url, repositoryPath);
|
||||
this.mapComment = (comment) => {
|
||||
@@ -1830,6 +1833,10 @@ class GiteaRepository extends BaseRepository_1.BaseRepository {
|
||||
reviews: undefined
|
||||
};
|
||||
}
|
||||
/**
|
||||
* WARNING: This does not actually get the diff from the remote, as Gitea does not offer a compareable API.
|
||||
* This uses the local repository to get the diff. NOTE: As such, gitea integration requires the repo available.
|
||||
*/
|
||||
getDiffRemote(owner, repo, base, head) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let changedFilesCount = 0;
|
||||
@@ -1952,7 +1959,7 @@ class GiteaRepository extends BaseRepository_1.BaseRepository {
|
||||
getTags(owner, repo, maxTagsToFetch) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(`start to get gitea tag `);
|
||||
core.debug(`Start to get tag from gitea`);
|
||||
const response = yield this.api.repos.repoListTags(owner, repo, {
|
||||
limit: maxTagsToFetch
|
||||
});
|
||||
@@ -1972,9 +1979,6 @@ class GiteaRepository extends BaseRepository_1.BaseRepository {
|
||||
return tagsInfo;
|
||||
});
|
||||
}
|
||||
get homeUrl() {
|
||||
return 'https://gitea.com';
|
||||
}
|
||||
}
|
||||
exports.GiteaRepository = GiteaRepository;
|
||||
GiteaRepository.pulls = {
|
||||
@@ -2254,6 +2258,10 @@ class GithubRepository extends BaseRepository_1.BaseRepository {
|
||||
get defaultUrl() {
|
||||
return 'https://api.github.com';
|
||||
}
|
||||
get homeUrl() {
|
||||
var _a;
|
||||
return ((_a = this.url) === null || _a === void 0 ? void 0 : _a.replace('api.', '')) || 'https://github.com';
|
||||
}
|
||||
constructor(token, url, repositoryPath) {
|
||||
super(token, url, repositoryPath);
|
||||
this.mapPullRequest = (pr, status = 'open') => {
|
||||
@@ -2384,9 +2392,6 @@ class GithubRepository extends BaseRepository_1.BaseRepository {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
get homeUrl() {
|
||||
return 'https://github.com';
|
||||
}
|
||||
}
|
||||
exports.GithubRepository = GithubRepository;
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user