Commit b0f3c6a
committed
fix(releases): switch getLatestRelease to GraphQL for immutable releases
GitHub's REST /repos/:owner/:repo/releases endpoint excludes immutable releases (the default for releases created since GitHub introduced release immutability), returning an empty array even when the repo has dozens of published releases. socket-btm's recent releases (binject, iocraft, models, node-smol, …) are all immutable, so any caller using getLatestRelease for tool-prefix discovery saw 'No <prefix>- release found in latest 100 releases' and the downstream socket-cli build failed at download-assets.
Switch the listing query to the GraphQL endpoint (repository.releases connection), which includes immutable releases. The per-tag fetch in getReleaseAssetUrl stays on REST since /releases/tags/:tag works correctly for immutable releases. Tests updated with a wrapReleasesAsGraphQL helper that wraps the existing REST-shape fixtures, keeping the test data readable while exercising the new GraphQL parse path. All 40 release-github tests pass.1 parent 320c217 commit b0f3c6a
3 files changed
Lines changed: 93 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
576 | 584 | | |
577 | | - | |
| 585 | + | |
578 | 586 | | |
579 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
580 | 603 | | |
581 | 604 | | |
582 | 605 | | |
| |||
590 | 613 | | |
591 | 614 | | |
592 | 615 | | |
593 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
594 | 642 | | |
595 | 643 | | |
596 | | - | |
| 644 | + | |
597 | 645 | | |
598 | 646 | | |
599 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
39 | 70 | | |
40 | 71 | | |
41 | 72 | | |
| |||
253 | 284 | | |
254 | 285 | | |
255 | 286 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 287 | + | |
261 | 288 | | |
262 | 289 | | |
263 | 290 | | |
| |||
333 | 360 | | |
334 | 361 | | |
335 | 362 | | |
336 | | - | |
| 363 | + | |
337 | 364 | | |
338 | 365 | | |
339 | 366 | | |
| |||
368 | 395 | | |
369 | 396 | | |
370 | 397 | | |
371 | | - | |
| 398 | + | |
372 | 399 | | |
373 | 400 | | |
374 | 401 | | |
| |||
400 | 427 | | |
401 | 428 | | |
402 | 429 | | |
403 | | - | |
| 430 | + | |
404 | 431 | | |
405 | 432 | | |
406 | 433 | | |
| |||
435 | 462 | | |
436 | 463 | | |
437 | 464 | | |
438 | | - | |
| 465 | + | |
439 | 466 | | |
440 | 467 | | |
441 | 468 | | |
| |||
467 | 494 | | |
468 | 495 | | |
469 | 496 | | |
470 | | - | |
| 497 | + | |
471 | 498 | | |
472 | 499 | | |
473 | 500 | | |
| |||
497 | 524 | | |
498 | 525 | | |
499 | 526 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 527 | + | |
505 | 528 | | |
506 | 529 | | |
507 | 530 | | |
| |||
534 | 557 | | |
535 | 558 | | |
536 | 559 | | |
537 | | - | |
| 560 | + | |
538 | 561 | | |
539 | 562 | | |
540 | 563 | | |
| |||
0 commit comments