This commit is contained in:
Kirill Zhuravlev 2023-02-15 04:10:05 +01:00 committed by Avelino
parent 270d554b95
commit 5a7a10e3f4
No known key found for this signature in database
GPG Key ID: B345B4D52E98180A
2 changed files with 7 additions and 3 deletions

View File

@ -248,12 +248,14 @@ func extractCategory(doc *goquery.Document, selector string) (*Category, error)
url, _ := selLink.Attr("href")
link := Link{
Title: selLink.Text(),
// FIXME: Title contains only title but description contains Title + description
// FIXME(kazhuravlev): Title contains only title but
// description contains Title + description
Description: selLi.Text(),
Url: url,
}
links = append(links, link)
})
// FIXME: In this case we would have an empty category in main index.html with link to 404 page.
if len(links) == 0 {
err = errors.New("category does not contain links")

View File

@ -26,7 +26,7 @@ const issueTemplateContent = `
var issueTemplate = template.Must(template.New("issue").Parse(issueTemplateContent))
// FIXME: replace to official github client
// FIXME: use official github client
var reGithubRepo = regexp.MustCompile("https://github.com/[a-zA-Z0-9-._]+/[a-zA-Z0-9-._]+$")
var githubGETREPO = "https://api.github.com/repos%s"
var githubGETCOMMITS = "https://api.github.com/repos%s/commits"
@ -34,7 +34,9 @@ var githubPOSTISSUES = "https://api.github.com/repos/avelino/awesome-go/issues"
// FIXME: use https
var awesomeGoGETISSUES = "http://api.github.com/repos/avelino/awesome-go/issues" //only returns open issues
// FIXME: time.Hour * ...
// FIXME: variable has type Duration, but contains a number. we should use
//
// time.Hour * ... or change type of variable
var numberOfYears time.Duration = 1
var timeNow = time.Now()
var issueTitle = fmt.Sprintf("Investigate repositories with more than 1 year without update - %s", timeNow.Format("2006-01-02"))