File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
cmd/external-plugins/cherrypicker Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,6 @@ func main() {
123123 if err != nil {
124124 logrus .WithError (err ).Fatal ("Error getting bot name." )
125125 }
126- repos , err := githubClient .GetRepos (botUser .Login , true )
127- if err != nil {
128- log .WithError (err ).Fatal ("Error listing bot repositories." )
129- }
130126
131127 server := & Server {
132128 tokenGenerator : secret .GetTokenGenerator (o .webhookSecretFile ),
@@ -142,11 +138,18 @@ func main() {
142138 allowAll : o .allowAll ,
143139 issueOnConflict : o .issueOnConflict ,
144140 labelPrefix : o .labelPrefix ,
141+ skipFork : o .skipFork ,
145142
146143 bare : & http.Client {},
147144 patchURL : "https://patch-diff.githubusercontent.com" ,
148-
149- repos : repos ,
145+ }
146+ if ! server .skipFork {
147+ repos , err := githubClient .GetRepos (botUser .Login , true )
148+ if err != nil {
149+ log .WithError (err ).Fatal ("Error listing bot repositories." )
150+ } else {
151+ server .repos = repos
152+ }
150153 }
151154
152155 health := pjutil .NewHealthOnPort (o .instrumentationOptions .HealthPort )
You can’t perform that action at this time.
0 commit comments