Repository navigation
Commit f3ab791
fix(api): env-aware GitHub check-run details_url (staging linked to prod domain) (#196)
The "Void Build" check-run's details_url was hardcoded
`https://${projectSlug}.void.app` at every call site, so on staging the check
run linked to the production traffic domain instead of `*.staging.void.app`
(observed live: a staging build's check-run pointed at `moonglade.void.app`).
Add a `projectUrl(config)` helper that resolves the base domain from the
per-environment `SITE_DOMAIN` binding (`env.SITE_DOMAIN ?? SITE_DOMAIN`) — the
same source the deploy-URL output uses — and route all 8 check-run details_url
emitters through it: the create POST, the 5 direct terminal finalizes, the
`finalizeCheckRunToStatus` status→conclusion helper, and cancelBuild's finalize
(which previously passed no details_url at all). Prod (SITE_DOMAIN unset or
`void.app`) is byte-identical to before.
Tests: staging create+finalize link to `{slug}.staging.void.app`; the
finalizeCheckRunToStatus PATCH path (pre-start prior-run finalize) links to
staging; unset SITE_DOMAIN falls back to prod; cancelBuild now emits details_url.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent ce37a2a commit f3ab791
2 files changed
Lines changed: 86 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
594 | | - | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
608 | 620 | | |
609 | 621 | | |
610 | 622 | | |
| |||
680 | 692 | | |
681 | 693 | | |
682 | 694 | | |
683 | | - | |
| 695 | + | |
684 | 696 | | |
685 | 697 | | |
686 | 698 | | |
| |||
797 | 809 | | |
798 | 810 | | |
799 | 811 | | |
800 | | - | |
| 812 | + | |
801 | 813 | | |
802 | 814 | | |
803 | 815 | | |
| |||
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
823 | | - | |
| 835 | + | |
824 | 836 | | |
825 | 837 | | |
826 | 838 | | |
| |||
860 | 872 | | |
861 | 873 | | |
862 | 874 | | |
863 | | - | |
| 875 | + | |
864 | 876 | | |
865 | 877 | | |
866 | 878 | | |
| |||
939 | 951 | | |
940 | 952 | | |
941 | 953 | | |
942 | | - | |
| 954 | + | |
943 | 955 | | |
944 | 956 | | |
945 | 957 | | |
| |||
995 | 1007 | | |
996 | 1008 | | |
997 | 1009 | | |
| 1010 | + | |
998 | 1011 | | |
999 | 1012 | | |
1000 | 1013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
650 | 655 | | |
651 | 656 | | |
652 | 657 | | |
| |||
1383 | 1388 | | |
1384 | 1389 | | |
1385 | 1390 | | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
0 commit comments