mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 14:44:35 -04:00
Merge branch 'forgejo' into forgejo
This commit is contained in:
commit
75f703326f
12 changed files with 892 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue