Merge branch 'forgejo' into forgejo

This commit is contained in:
Fermé le Lundi 2024-11-29 15:37:59 +00:00
commit 75f703326f
12 changed files with 892 additions and 32 deletions

View file

@ -411,6 +411,25 @@ func (issue *Issue) HTMLURL() string {
return fmt.Sprintf("%s/%s/%d", issue.Repo.HTMLURL(), path, issue.Index)
}
// SummaryCardURL returns the absolute URL to an image providing a summary of the issue
func (issue *Issue) SummaryCardURL() string {
return fmt.Sprintf("%s/summary-card", issue.HTMLURL())
}
func (issue *Issue) SummaryCardSize() (int, int) {
return 1200, 600
}
func (issue *Issue) SummaryCardWidth() int {
width, _ := issue.SummaryCardSize()
return width
}
func (issue *Issue) SummaryCardHeight() int {
_, height := issue.SummaryCardSize()
return height
}
// Link returns the issue's relative URL.
func (issue *Issue) Link() string {
var path string