Skip to content

Commit 2e43881

Browse files
committed
add some protips
1 parent 9a914aa commit 2e43881

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

pkg/cmd/protip/protips.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package protip
2+
3+
import (
4+
"math/rand"
5+
"time"
6+
)
7+
8+
func getProtip() []string {
9+
rand.Seed(time.Now().UnixNano())
10+
tips := [][]string{
11+
{
12+
"To merge a pull request, review it",
13+
"until it is approved",
14+
},
15+
{
16+
"To have gh use a different editor you can run:",
17+
"gh config set editor <name of editor>",
18+
},
19+
{
20+
"If you prefer to use gh over ssh you can run:",
21+
"gh config set git_protocol ssh",
22+
},
23+
{
24+
"You can search through issues using grep:",
25+
"gh issue list -L200 | grep 'search term'",
26+
},
27+
}
28+
29+
return tips[rand.Intn(len(tips))]
30+
}

0 commit comments

Comments
 (0)