Feat: support gitee repository in addon registry (#3393)

* Feat: support gitee repository in addon registry
Signed-off-by: fourierr <maxiangboo@163.com>

* Feat: support gitee repository in addon registry
Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

Signed-off-by: fourierr <maxiangboo@yeah.net>

* Feat: support gitee repository in addon registry Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

* Feat: support gitee repository in addon registry Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

Signed-off-by: fourierr <maxiangboo@qq.com>

Co-authored-by: fourierr <maxiangboo@yeah.net>
This commit is contained in:
maxiangbo
2022-03-10 10:11:45 +08:00
committed by GitHub
co-authored by fourierr
parent 04db938ffa
commit 52f3636a2d
10 changed files with 449 additions and 21 deletions
+2 -2
View File
@@ -96,9 +96,9 @@ func (g *gitReader) ReadFile(relativePath string) (content string, err error) {
func (g *gitReader) RelativePath(item Item) string {
absPath := strings.Split(item.GetPath(), "/")
if g.h.Meta.Path == "" {
if g.h.Meta.GithubContent.Path == "" {
return path.Join(absPath...)
}
base := strings.Split(g.h.Meta.Path, "/")
base := strings.Split(g.h.Meta.GithubContent.Path, "/")
return path.Join(absPath[len(base):]...)
}