Gitea remote support
This commit is contained in:
@@ -14,12 +14,6 @@ func (r *GiteaRemote) ReposToProjects(repos []*gitea.Repository) []*projects.Pro
|
||||
pList := make([]*projects.Project, len(repos))
|
||||
for i, repo := range repos {
|
||||
path := strings.Split(repo.FullName, "/")
|
||||
var repoPath []string
|
||||
if len(path) > 1 {
|
||||
repoPath = path[:len(path)-1]
|
||||
} else {
|
||||
repoPath = path
|
||||
}
|
||||
project := &projects.Project{
|
||||
ID: int(repo.ID),
|
||||
Description: repo.Description,
|
||||
@@ -28,7 +22,7 @@ func (r *GiteaRemote) ReposToProjects(repos []*gitea.Repository) []*projects.Pro
|
||||
WebURL: repo.HTMLURL,
|
||||
Name: repo.Name,
|
||||
NameWithNamespace: repo.FullName,
|
||||
Path: strings.Join(repoPath, "/"),
|
||||
Path: path[len(path)-1],
|
||||
AvatarURL: repo.AvatarURL,
|
||||
PathWithNamespace: strings.Join(path, "/"),
|
||||
LastActivityAt: repo.Updated,
|
||||
|
||||
Reference in New Issue
Block a user