Skip to content

Commit 1eb8b43

Browse files
committed
Don't proc on private repos
1 parent 999afba commit 1eb8b43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,17 @@ func main() {
6262
}
6363
switch p := payload.(type) {
6464
case github.PullRequestPayload:
65+
if p.Repository.Private {
66+
return
67+
}
6568
if p.Action != "opened" && p.Action != "closed" {
6669
return
6770
}
6871
conn.Noticef(channel, "%s %s #%d (%s)", p.Sender.Login, p.Action, p.Number, p.PullRequest.Title)
6972
case github.PushPayload:
73+
if p.Repository.Private {
74+
return
75+
}
7076
if p.Ref != "refs/heads/master" {
7177
return
7278
}

0 commit comments

Comments
 (0)