mirror of
https://github.com/documize/community.git
synced 2025-08-09 07:25:23 +02:00
cosmetic changes
This commit is contained in:
parent
75a6efec10
commit
a7bc2bd88b
1 changed files with 15 additions and 3 deletions
|
@ -29,6 +29,9 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO find a smaller image than the one below
|
||||||
|
const githubGravatar = "https://i2.wp.com/assets-cdn.github.com/images/gravatars/gravatar-user-420.png"
|
||||||
|
|
||||||
var meta provider.TypeMeta
|
var meta provider.TypeMeta
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -321,6 +324,14 @@ func (*Provider) getIssueNum(client *gogithub.Client, config githubConfig) ([]gi
|
||||||
Avatar: a,
|
Avatar: a,
|
||||||
URL: template.URL(*issue.HTMLURL),
|
URL: template.URL(*issue.HTMLURL),
|
||||||
})
|
})
|
||||||
|
ret = append(ret, githubIssueActivity{
|
||||||
|
Name: "",
|
||||||
|
Event: "NOTE",
|
||||||
|
Message: template.HTML("Issue timeline below is in reverse order"),
|
||||||
|
Date: "",
|
||||||
|
Avatar: githubGravatar,
|
||||||
|
URL: template.URL(*issue.HTMLURL),
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
@ -350,7 +361,8 @@ func (*Provider) getIssueNum(client *gogithub.Client, config githubConfig) ([]gi
|
||||||
u = fmt.Sprintf("https://github.com/%s/%s/issues/%d#event-%d",
|
u = fmt.Sprintf("https://github.com/%s/%s/issues/%d#event-%d",
|
||||||
config.Owner, config.Repo, config.IssueNum, *v.ID)
|
config.Owner, config.Repo, config.IssueNum, *v.ID)
|
||||||
|
|
||||||
if *v.Event == "commented" {
|
switch *v.Event {
|
||||||
|
case "commented":
|
||||||
ic, _, err := client.Issues.GetComment(config.Owner, config.Repo, *v.ID)
|
ic, _, err := client.Issues.GetComment(config.Owner, config.Repo, *v.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.ErrorString("github error fetching issue event comment: " + err.Error())
|
log.ErrorString("github error fetching issue event comment: " + err.Error())
|
||||||
|
@ -387,6 +399,7 @@ func (*Provider) getIssueNum(client *gogithub.Client, config githubConfig) ([]gi
|
||||||
func (*Provider) getIssues(client *gogithub.Client, config githubConfig) ([]githubIssue, error) {
|
func (*Provider) getIssues(client *gogithub.Client, config githubConfig) ([]githubIssue, error) {
|
||||||
|
|
||||||
opts := &gogithub.IssueListByRepoOptions{
|
opts := &gogithub.IssueListByRepoOptions{
|
||||||
|
Sort: "created",
|
||||||
ListOptions: gogithub.ListOptions{PerPage: config.BranchLines}}
|
ListOptions: gogithub.ListOptions{PerPage: config.BranchLines}}
|
||||||
|
|
||||||
if config.SincePtr != nil {
|
if config.SincePtr != nil {
|
||||||
|
@ -492,8 +505,7 @@ func (*Provider) getCommits(client *gogithub.Client, config githubConfig) ([]git
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if a == "" {
|
if a == "" {
|
||||||
// TODO find a smaller image than the one below
|
a = githubGravatar
|
||||||
a = "https://i2.wp.com/assets-cdn.github.com/images/gravatars/gravatar-user-420.png"
|
|
||||||
}
|
}
|
||||||
if v.HTMLURL != nil {
|
if v.HTMLURL != nil {
|
||||||
u = *v.HTMLURL
|
u = *v.HTMLURL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue