* 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>
Co-authored-by: Lauris BH <lauris@nix.lv>
apiIssue := &api.Issue{
ID: issue.ID,
URL: issue.APIURL(),
+ HTMLURL: issue.HTMLURL(),
Index: issue.Index,
Poster: issue.Poster.APIFormat(),
Title: issue.Title,
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"`
Title: issueTitle,
HideAvatar: "0",
SingleTitle: "view issue",
- SingleURL: p.Issue.URL,
+ SingleURL: p.Issue.HTMLURL,
},
}, nil
}
{
Title: text,
Description: attachmentText,
- URL: p.Issue.URL,
+ URL: p.Issue.HTMLURL,
Color: color,
Author: DiscordEmbedAuthor{
Name: p.Sender.UserName,
Targets: []MSTeamsActionTarget{
{
Os: "default",
- URI: p.Issue.URL,
+ URI: p.Issue.HTMLURL,
},
},
},
pl.Attachments = []SlackAttachment{{
Color: fmt.Sprintf("%x", color),
Title: issueTitle,
- TitleLink: p.Issue.URL,
+ TitleLink: p.Issue.HTMLURL,
Text: attachmentText,
}}
}
"format": "date-time",
"x-go-name": "Deadline"
},
+ "html_url": {
+ "type": "string",
+ "x-go-name": "HTMLURL"
+ },
"id": {
"type": "integer",
"format": "int64",