1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/github/display.go
2018-04-18 16:57:36 -07:00

23 lines
601 B
Go

package github
import (
"fmt"
)
func (widget *Widget) display() {
client := NewClient()
prs, _ := client.PullRequests(Config.UString("wtf.mods.github.owner"), Config.UString("wtf.mods.github.repo"))
widget.View.Clear()
widget.View.SetTitle(fmt.Sprintf(" Github: %s ", widget.title()))
str := " [red]Open Review Requests[white]\n"
str = str + widget.prsForReview(prs, Config.UString("wtf.mods.github.username"))
str = str + "\n"
str = str + " [red]Open Pull Requests[white]\n"
str = str + widget.openPRs(prs, Config.UString("wtf.mods.github.username"))
fmt.Fprintf(widget.View, str)
}