mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fixed git issue
This commit is contained in:
4
backend/model/market/repo.go
Normal file
4
backend/model/market/repo.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package market
|
||||
|
||||
type Repo struct {
|
||||
}
|
||||
1
backend/routes/market.go
Normal file
1
backend/routes/market.go
Normal file
@@ -0,0 +1 @@
|
||||
package routes
|
||||
@@ -139,10 +139,7 @@ func SaveSpiderGitSyncError(s model.Spider, errMsg string) {
|
||||
// 获得Git分支
|
||||
func GetGitRemoteBranchesPlain(gitUrl string, username string, password string) (branches []string, err error) {
|
||||
storage := memory.NewStorage()
|
||||
u, err := url.Parse(gitUrl)
|
||||
if err != nil {
|
||||
return branches, err
|
||||
}
|
||||
u, _ := url.Parse(gitUrl)
|
||||
var listOptions git.ListOptions
|
||||
if strings.HasPrefix(gitUrl, "http") {
|
||||
gitUrl = fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user