mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 12:06:38 +00:00
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:
@@ -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):]...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user