Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/modcheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"strconv"

"github.com/euanwm/modcheck"
"github.com/gdamore/tcell/v2"
Expand Down Expand Up @@ -106,15 +107,15 @@ func populateTable(repos []modcheck.Repo, table *tview.Table) {
SetTextColor(tview.Styles.PrimaryTextColor).
SetAlign(tview.AlignCenter))

table.SetCell(repo+1, OpenIssuesColumn, tview.NewTableCell(repos[repo].OSIData.OpenIssuesCount).
table.SetCell(repo+1, OpenIssuesColumn, tview.NewTableCell(strconv.Itoa(repos[repo].OSIData.OpenIssuesCount)).
SetTextColor(tview.Styles.PrimaryTextColor).
SetAlign(tview.AlignCenter))

table.SetCell(repo+1, StarsColumn, tview.NewTableCell(repos[repo].OSIData.StarsCount).
table.SetCell(repo+1, StarsColumn, tview.NewTableCell(strconv.Itoa(repos[repo].OSIData.StarsCount)).
SetTextColor(tview.Styles.PrimaryTextColor).
SetAlign(tview.AlignCenter))

table.SetCell(repo+1, ForksColumn, tview.NewTableCell(repos[repo].OSIData.ForksCount).
table.SetCell(repo+1, ForksColumn, tview.NewTableCell(strconv.Itoa(repos[repo].OSIData.ForksCount)).
SetTextColor(tview.Styles.PrimaryTextColor).
SetAlign(tview.AlignCenter))

Expand Down
4 changes: 2 additions & 2 deletions modcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func Test_UpdateAllRepos(t *testing.T) {
}
}

if count != 10 {
t.Errorf("expected 10, got %v", count)
if count != 11 {
t.Errorf("expected 11, got %v", count)
}
}

Expand Down
8 changes: 4 additions & 4 deletions repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type Project struct {
ID string `json:"id"`
} `json:"projectKey"`

OpenIssuesCount string `json:"openIssuesCount"`
StarsCount string `json:"starsCount"`
ForksCount string `json:"forksCount"`
OpenIssuesCount int `json:"openIssuesCount"`
StarsCount int `json:"starsCount"`
ForksCount int `json:"forksCount"`
License string `json:"license"`
Description string `json:"description"`
Homepage string `json:"homepage"`
Expand All @@ -42,7 +42,7 @@ type Project struct {
ShortDescription string `json:"shortDescription"`
URL string `json:"url"`
} `json:"documentation"`
Score string `json:"score"`
Score int `json:"score"`
Reason string `json:"reason"`
Details []string `json:"details"`
} `json:"checks"`
Expand Down
Loading