mirror of
https://github.com/go-gitea/gitea
synced 2024-12-21 16:38:27 +01:00
Add HTML URL to API Issues (#9654)
* Add HTML URL to API Issues Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
14a9687444
commit
5b2d9333f1
@ -381,6 +381,7 @@ func (issue *Issue) apiFormat(e Engine) *api.Issue {
|
||||
apiIssue := &api.Issue{
|
||||
ID: issue.ID,
|
||||
URL: issue.APIURL(),
|
||||
HTMLURL: issue.HTMLURL(),
|
||||
Index: issue.Index,
|
||||
Poster: issue.Poster.APIFormat(),
|
||||
Title: issue.Title,
|
||||
|
@ -38,6 +38,7 @@ type RepositoryMeta struct {
|
||||
type Issue struct {
|
||||
ID int64 `json:"id"`
|
||||
URL string `json:"url"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
Index int64 `json:"number"`
|
||||
Poster *User `json:"user"`
|
||||
OriginalAuthor string `json:"original_author"`
|
||||
|
@ -142,7 +142,7 @@ func getDingtalkIssuesPayload(p *api.IssuePayload) (*DingtalkPayload, error) {
|
||||
Title: issueTitle,
|
||||
HideAvatar: "0",
|
||||
SingleTitle: "view issue",
|
||||
SingleURL: p.Issue.URL,
|
||||
SingleURL: p.Issue.HTMLURL,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ func getDiscordIssuesPayload(p *api.IssuePayload, meta *DiscordMeta) (*DiscordPa
|
||||
{
|
||||
Title: text,
|
||||
Description: attachmentText,
|
||||
URL: p.Issue.URL,
|
||||
URL: p.Issue.HTMLURL,
|
||||
Color: color,
|
||||
Author: DiscordEmbedAuthor{
|
||||
Name: p.Sender.UserName,
|
||||
|
@ -299,7 +299,7 @@ func getMSTeamsIssuesPayload(p *api.IssuePayload) (*MSTeamsPayload, error) {
|
||||
Targets: []MSTeamsActionTarget{
|
||||
{
|
||||
Os: "default",
|
||||
URI: p.Issue.URL,
|
||||
URI: p.Issue.HTMLURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -158,7 +158,7 @@ func getSlackIssuesPayload(p *api.IssuePayload, slack *SlackMeta) (*SlackPayload
|
||||
pl.Attachments = []SlackAttachment{{
|
||||
Color: fmt.Sprintf("%x", color),
|
||||
Title: issueTitle,
|
||||
TitleLink: p.Issue.URL,
|
||||
TitleLink: p.Issue.HTMLURL,
|
||||
Text: attachmentText,
|
||||
}}
|
||||
}
|
||||
|
@ -10305,6 +10305,10 @@
|
||||
"format": "date-time",
|
||||
"x-go-name": "Deadline"
|
||||
},
|
||||
"html_url": {
|
||||
"type": "string",
|
||||
"x-go-name": "HTMLURL"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
|
Loading…
Reference in New Issue
Block a user