Commit 3fc6fbf
committed
Fix a bug in the app's repo lifecycle.
Previously, the lifecycle of a repo was:
validating -> initializing -> hooks initializing -> ready
However, the "initialize" method (which corresponds to the
"initializing" state) was reused to update the repo in response to any
web hooks being called, and this caused it to continuously recreate the
web hook (as it thought it needed to transition from the "initializing"
to "hooks initializing" state).
This change fixes that bug by reordering the lifecycle states so that
"hooks initializing" comes *before* "initializing", and so the
"initialize" method does not need to do any follow up work other than
make sure the repo is in the "ready" state (which is an idempotent operation).1 parent 41aec20 commit 3fc6fbf
1 file changed
Lines changed: 30 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
183 | 199 | | |
184 | 200 | | |
185 | 201 | | |
186 | | - | |
| 202 | + | |
187 | 203 | | |
188 | 204 | | |
189 | 205 | | |
190 | 206 | | |
191 | 207 | | |
192 | 208 | | |
193 | | - | |
194 | | - | |
| 209 | + | |
195 | 210 | | |
196 | 211 | | |
197 | 212 | | |
| |||
268 | 283 | | |
269 | 284 | | |
270 | 285 | | |
271 | | - | |
| 286 | + | |
272 | 287 | | |
273 | 288 | | |
274 | 289 | | |
| |||
278 | 293 | | |
279 | 294 | | |
280 | 295 | | |
281 | | - | |
282 | | - | |
283 | 296 | | |
284 | 297 | | |
285 | 298 | | |
| |||
456 | 469 | | |
457 | 470 | | |
458 | 471 | | |
459 | | - | |
| 472 | + | |
460 | 473 | | |
461 | 474 | | |
462 | 475 | | |
463 | | - | |
| 476 | + | |
464 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
465 | 481 | | |
466 | 482 | | |
467 | 483 | | |
| |||
0 commit comments