mirror of
https://github.com/documize/community.git
synced 2025-07-21 22:29:41 +02:00
github for single repos only, with selectable sub-sections
This commit is contained in:
parent
7bf9901c9a
commit
6e362c0eac
10 changed files with 104 additions and 28 deletions
|
@ -79,6 +79,10 @@ func init() {
|
|||
|
||||
func getMilestones(client *gogithub.Client, config *githubConfig) ([]githubMilestone, error) {
|
||||
|
||||
if !config.ShowMilestones {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
ret := []githubMilestone{}
|
||||
|
||||
hadRepo := make(map[string]bool)
|
||||
|
@ -156,6 +160,10 @@ func getMilestones(client *gogithub.Client, config *githubConfig) ([]githubMiles
|
|||
|
||||
func refreshMilestones(gr *githubRender, config *githubConfig, client *gogithub.Client) (err error) {
|
||||
|
||||
if !config.ShowMilestones {
|
||||
return nil
|
||||
}
|
||||
|
||||
gr.Milestones, err = getMilestones(client, config)
|
||||
if err != nil {
|
||||
log.Error("unable to get github milestones", err)
|
||||
|
@ -176,6 +184,11 @@ func refreshMilestones(gr *githubRender, config *githubConfig, client *gogithub.
|
|||
}
|
||||
|
||||
func renderMilestones(payload *githubRender, c *githubConfig) error {
|
||||
|
||||
if !c.ShowMilestones {
|
||||
return nil
|
||||
}
|
||||
|
||||
hadRepo := make(map[string]bool)
|
||||
payload.RepoCount = 0
|
||||
for _, orb := range payload.List {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue