diff --git a/github.go b/github.go
index e7a44ee..1b94d0d 100644
--- a/github.go
+++ b/github.go
@@ -98,6 +98,7 @@ func makeMdTable(data [][]string, header []string) string {
table.SetHeader(header)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
+ table.SetColWidth(300)
table.AppendBulk(data)
table.Render()
return tableString.String()
@@ -121,6 +122,13 @@ func makeReposString(repos []*github.Repository) string {
reposData := [][]string{}
for i, repo := range repos {
repoWithLink := fmt.Sprintf("[%s](%s)", *repo.Name, *repo.HTMLURL)
+ var description string
+ if repo.Description == nil {
+ description = *repo.Name
+ } else {
+ description = *repo.Description
+ }
+ // *description = strings.Replace(*description, "\n", "
", -1)
reposData = append(
reposData,
[]string{
@@ -129,7 +137,7 @@ func makeReposString(repos []*github.Repository) string {
(*repo.UpdatedAt).String()[:10],
(*repo.CreatedAt).String()[:10],
strconv.Itoa(*repo.ForksCount),
- strings.Replace(*repo.Description, "\n", "
", -1),
+ description,
},
)
}