Commit 99378b0
committed
Problem: [JENKINS-60901] GitHub manages hooks even when it has not been configured to do it (and complains a lot in the log)
Solution: Check if configured to manage hooks before trying to
register or unregister them (which in case of no credential set
up, results in a meaningful exception message plus a lengthy
but somewhat useless stacktrace). If nothing else, this reduces
I/O and storage overhead due to hook not configured and disabled.
Signed-off-by: Jim Klimov <[email protected]>1 parent 51dc96b commit 99378b0
File tree
2 files changed
+17
-0
lines changed- src
- main/java/org/jenkinsci/plugins/github/webhook
- test/java/org/jenkinsci/plugins/github/admin
2 files changed
+17
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
179 | 190 | | |
180 | 191 | | |
181 | 192 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
| |||
0 commit comments