gitea >= 1.12 has single release page

This commit is contained in:
6543 2020-08-07 14:36:07 +02:00
parent cc58d758be
commit e12449228d
No known key found for this signature in database
GPG Key ID: A1CA74D27FD13271
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ func (ge *Gitea) Generate() (string, []Entry, error) {
}
tagURL := fmt.Sprintf("## [%s](%s/%s/%s/%s?q=&type=all&state=closed&milestone=%d) - %s", ge.Milestone, ge.BaseURL, ge.Owner, ge.Repo, from, milestoneID, time.Now().Format("2006-01-02"))
if err := client.CheckServerVersionConstraint(">=1.12"); err == nil {
tagURL = fmt.Sprintf("## [%s](%s/%s/%s/releases/tag/%s) - %s", ge.Milestone, ge.BaseURL, ge.Owner, ge.Repo, ge.Milestone, time.Now().Format("2006-01-02"))
}
p := 1
// https://github.com/go-gitea/gitea/blob/d92781bf941972761177ac9e07441f8893758fd3/models/repo.go#L63