@@ -88,7 +88,7 @@ func printMarkDown(issues []*Issue, version *string) {
8888 sections := make (map [string ]string , 0 )
8989
9090 for _ , iss := range issues {
91- if iss .PullRequest == nil || len ( iss . Labels ) == 0 {
91+ if iss .PullRequest == nil {
9292 continue
9393 }
9494
@@ -118,11 +118,17 @@ func printMarkDown(issues []*Issue, version *string) {
118118}
119119
120120// Get issues from repository
121- func getIssues (repository string ) ([]* Issue , error ) {
122- res , err := http .Get (apiPrefix + repository + issuesPathAndQuery )
121+ func getIssues (repository string , username * string ) ([]* Issue , error ) {
122+ client := & http.Client {}
123+ req , err := http .NewRequest (http .MethodGet , apiPrefix + repository + issuesPathAndQuery , nil )
124+ if username != nil {
125+ req .SetBasicAuth (* username , "" )
126+ }
127+ res , err := client .Do (req )
123128 if err != nil {
124129 return nil , err
125130 }
131+
126132 defer res .Body .Close ()
127133
128134 issues := make ([]* Issue , 0 )
@@ -135,12 +141,13 @@ func getIssues(repository string) ([]*Issue, error) {
135141
136142func main () {
137143 version := flag .String ("v" , "1.0.0" , "Version of release, example: -v=1.0.0" )
144+ username := flag .String ("u" , "" , "GitHub username for request, example: -u=octocat" )
138145
139146 flag .Parse ()
140147
141148 issues := make ([]* Issue , 0 )
142149 for _ , repository := range repositories {
143- iss , err := getIssues (repository )
150+ iss , err := getIssues (repository , username )
144151 if err != nil {
145152 return
146153 }
0 commit comments