github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/core/section/github/summary.go (about)

     1  // Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
     2  //
     3  // This software (Documize Community Edition) is licensed under
     4  // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
     5  //
     6  // You can operate outside the AGPL restrictions by purchasing
     7  // Documize Enterprise Edition and obtaining a commercial license
     8  // by contacting <sales@documize.com>.
     9  //
    10  // https://documize.com
    11  
    12  package github
    13  
    14  import (
    15  	gogithub "github.com/google/go-github/github"
    16  )
    17  
    18  const (
    19  	tagSummaryData = "summaryData"
    20  )
    21  
    22  // sort branches in order that that should be presented.
    23  
    24  type branchesToSort []githubBranch
    25  
    26  func (s branchesToSort) Len() int      { return len(s) }
    27  func (s branchesToSort) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
    28  func (s branchesToSort) Less(i, j int) bool {
    29  	return s[i].URL < s[j].URL
    30  }
    31  
    32  func init() {
    33  	reports[tagSummaryData] = report{refreshSummary, renderSummary, summaryTemplate}
    34  }
    35  
    36  func refreshSummary(gr *githubRender, config *githubConfig, client *gogithub.Client) (err error) {
    37  	return nil
    38  }
    39  
    40  func renderSummary(payload *githubRender, c *githubConfig) error {
    41  	return nil
    42  }