1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

remove PR report, extend milestone use

This commit is contained in:
Elliott Stoneham 2016-08-19 12:42:01 +01:00
parent 20f77f359e
commit cc52106e20
5 changed files with 64 additions and 18 deletions

View file

@ -33,6 +33,7 @@ type githubIssue struct {
LabelNames []string `json:"labelNames"`
IsOpen bool `json:"isopen"`
Repo string `json:"repo"`
Milestone string `json:"milestone"`
}
// sort issues in order that that should be presented - by date updated.
@ -98,7 +99,7 @@ func init() {
{{end}}
</div>
<div class="github-commit-body">
<div class="github-commit-title"><span class="label-name">{{$data.Repo}} - {{$data.Message}}</span> {{$data.Labels}}</div>
<div class="github-commit-title"><span class="label-name">{{$data.Repo}} - {{$data.Message}}</span> :{{$data.Milestone}}: {{$data.Labels}}</div>
<div class="github-commit-meta">
#{{$data.ID}} opened on {{$data.Date}} by {{$data.Name}}, last updated {{$data.Updated}}
</div>
@ -168,6 +169,12 @@ func getIssues(client *gogithub.Client, config *githubConfig) ([]githubIssue, er
n = *ptr.Login
}
}
ms := noMilestone
if v.Milestone != nil {
if v.Milestone.Title != nil {
ms = *v.Milestone.Title
}
}
l, ln := wrapLabels(v.Labels)
ret = append(ret, githubIssue{
Name: n,
@ -180,6 +187,7 @@ func getIssues(client *gogithub.Client, config *githubConfig) ([]githubIssue, er
ID: *v.Number,
IsOpen: *v.State == "open",
Repo: rName,
Milestone: ms,
})
}
}