Skip to content

Commit

Permalink
fix: make canonicalTargets() support very short repos
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 23, 2018
1 parent 4ebc498 commit cd8bc6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func dbDump(opts *dbOptions) error {

func canonicalTargets(input []string) []string {
output := []string{}
base := Issue{RepoURL: "https://github.com/moul/depviz"}
base := Issue{RepoURL: "https://github.com/moul/depviz", URL: "https://github.com/moul/depviz/issues/1"}
for _, target := range input {
output = append(output, base.GetRelativeIssueURL(target))
}
Expand All @@ -80,7 +80,6 @@ func loadIssues(db *gorm.DB, targets []string) (Issues, error) {
if err := query.Find(&issues).Error; err != nil {
return nil, err
}
fmt.Println(targets, issues)
slice := IssueSlice(issues)
return slice.ToMap(), nil
}

0 comments on commit cd8bc6d

Please sign in to comment.