Skip to content

Commit

Permalink
fix #59, github bug badge error
Browse files Browse the repository at this point in the history
  • Loading branch information
gernotstarke committed Nov 26, 2023
1 parent fc47f3a commit 441e579
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion internal/api/arc42statistics.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
<td style="border-left: 2px solid black;">{{ .Visitors12m}}</td>
<td>{{ .Pageviews12m}}</td>
<td style="border-left: 2px solid black;"><a href="{{.Repo}}/issues">
<img alt="GitHub open issues" src="{{.IssueBadgeURL}}"><img alt="GitHub bugs" src="{{.BugBadgeURL}}">
<img alt="GitHub open issues" src="{{.IssueBadgeURL}}">
{{if .BugBadgeURL}}
<img alt="GitHub bugs" src="{{.BugBadgeURL}}">
{{end}}
</a></td>
</tr>
{{ end }}
Expand Down
7 changes: 3 additions & 4 deletions internal/github/issuesAndBugs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
package github

import (
"fmt"
"github.com/shurcooL/githubv4"
"golang.org/x/net/context"
"golang.org/x/oauth2"
Expand Down Expand Up @@ -66,9 +65,9 @@ func IssuesAndBugsCountForSite(thisSite string) (nrOfIssues int, nrOfBugs int) {
nrOfBugs = int(query.Repository.Bugs.TotalCount)
nrOfIssues = int(query.Repository.Issues.TotalCount)

// Output the result
fmt.Printf("Number of open issues: %d\n", nrOfIssues)
fmt.Printf("Number of open bugs: %d\n", nrOfBugs)
// Output the result if running on localhost
//fmt.Printf("Number of open issues: %d\n", nrOfIssues)
//fmt.Printf("Number of open bugs: %d\n", nrOfBugs)

// this kind of return takes the named result parameters and returns those...
return
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"site-usage-statistics/internal/domain"
)

const AppVersion = "0.3.2"
const AppVersion = "0.3.3"

func main() {

Expand Down

0 comments on commit 441e579

Please sign in to comment.