@@ -47,7 +47,7 @@ func (f *GiteaDownloaderFactory) New(ctx context.Context, opts base.MigrateOptio
47
47
48
48
path := strings .Split (repoNameSpace , "/" )
49
49
if len (path ) < 2 {
50
- return nil , fmt .Errorf ("invalid path" )
50
+ return nil , fmt .Errorf ("invalid path: %s" , repoNameSpace )
51
51
}
52
52
53
53
repoPath := strings .Join (path [len (path )- 2 :], "/" )
@@ -87,7 +87,7 @@ func NewGiteaDownloader(ctx context.Context, baseURL, repoPath, username, passwo
87
87
gitea_sdk .SetContext (ctx ),
88
88
)
89
89
if err != nil {
90
- log .Error (fmt .Sprintf ("NewGiteaDownloader: %s" , err . Error () ))
90
+ log .Error (fmt .Sprintf ("Failed to create NewGiteaDownloader for : %s. Error: %v " , baseURL , err ))
91
91
return nil , err
92
92
}
93
93
@@ -395,7 +395,7 @@ func (g *GiteaDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, err
395
395
396
396
reactions , err := g .getIssueReactions (issue .Index )
397
397
if err != nil {
398
- return nil , false , fmt .Errorf ("error while loading reactions: %v" , err )
398
+ return nil , false , fmt .Errorf ("error while loading reactions for issue #%d. Error : %v" , issue . Index , err )
399
399
}
400
400
401
401
var assignees []string
@@ -446,13 +446,13 @@ func (g *GiteaDownloader) GetComments(index int64) ([]*base.Comment, error) {
446
446
// Page: i,
447
447
}})
448
448
if err != nil {
449
- return nil , fmt .Errorf ("error while listing comments: %v" , err )
449
+ return nil , fmt .Errorf ("error while listing comments for issue #%d. Error : %v" , index , err )
450
450
}
451
451
452
452
for _ , comment := range comments {
453
453
reactions , err := g .getCommentReactions (comment .ID )
454
454
if err != nil {
455
- return nil , fmt .Errorf ("error while listing comment creactions : %v" , err )
455
+ return nil , fmt .Errorf ("error while listing reactions for comment %d in issue #%d. Error : %v" , comment . ID , index , err )
456
456
}
457
457
458
458
allComments = append (allComments , & base.Comment {
@@ -490,7 +490,7 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques
490
490
State : gitea_sdk .StateAll ,
491
491
})
492
492
if err != nil {
493
- return nil , false , fmt .Errorf ("error while listing repos : %v" , err )
493
+ return nil , false , fmt .Errorf ("error while listing pull requests (page : %d, pagesize: %d). Error: %v" , page , perPage , err )
494
494
}
495
495
for _ , pr := range prs {
496
496
var milestone string
@@ -521,7 +521,7 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques
521
521
if headSHA == "" {
522
522
headCommit , _ , err := g .client .GetSingleCommit (g .repoOwner , g .repoName , url .PathEscape (pr .Head .Ref ))
523
523
if err != nil {
524
- return nil , false , fmt .Errorf ("error while resolving git ref: %v" , err )
524
+ return nil , false , fmt .Errorf ("error while resolving head git ref: %s for pull #%d. Error: %v" , pr . Head . Ref , pr . Index , err )
525
525
}
526
526
headSHA = headCommit .SHA
527
527
}
@@ -534,7 +534,7 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques
534
534
535
535
reactions , err := g .getIssueReactions (pr .Index )
536
536
if err != nil {
537
- return nil , false , fmt .Errorf ("error while loading reactions: %v" , err )
537
+ return nil , false , fmt .Errorf ("error while loading reactions for pull #%d. Error : %v" , pr . Index , err )
538
538
}
539
539
540
540
var assignees []string
0 commit comments