Skip to content

Commit 76a6f9c

Browse files
pascalchevrelclaude
andcommitted
Fix /beta page showing no uplifts: use & not & in hg URLs
The hg.mozilla.org/hg-edge.mozilla.org backend recently tightened its query-string parsing and no longer tolerates HTML-encoded separators. With &amp;, only `fromchange` reached the server, so `version=2` was dropped and responses came back in the v1 shape (push IDs at the top level) without the `pushes` key getBugsFromHgWeb() expects, yielding the empty `no_data: true` stub for every beta. Mirrors the equivalent guard already in ReleaseUpliftsTest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cbda747 commit 76a6f9c

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎app/classes/ReleaseInsights/Beta.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ public function getLogEndpoints(): array
9494
$hg_end_points[$beta_version] =
9595
'releases/mozilla-beta/json-pushes?fromchange='
9696
. $beta_start
97-
. '&amp;tochange='
97+
. '&tochange='
9898
. $beta_end
99-
. '&amp;full&amp;version=2';
99+
. '&full&version=2';
100100
}
101101

102102
/*
@@ -125,9 +125,9 @@ public function getLogEndpoints(): array
125125
$hg_end_points[$rc_version] =
126126
'releases/mozilla-release/json-pushes?fromchange='
127127
. $rc_start
128-
. '&amp;tochange='
128+
. '&tochange='
129129
. $rc_end
130-
. '&amp;full&amp;version=2';
130+
. '&full&version=2';
131131
}
132132
}
133133

‎tests/Unit/ReleaseInsights/BetaTest.php‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
->each->toBeString();
1919
});
2020

21+
test('Beta->getLogEndpoints() URLs use & not &amp;', function () {
22+
$obj = new Beta();
23+
$endpoints = $obj->getLogEndpoints();
24+
25+
expect($endpoints)->toBeArray()->not->toBeEmpty();
26+
27+
foreach ($endpoints as $url) {
28+
expect($url)->not->toContain('&amp;');
29+
expect($url)->toContain('&');
30+
}
31+
});
32+
2133
test('Beta->crashes()', function () {
2234
$obj = new Beta();
2335
expect($obj->crashes())

0 commit comments

Comments
 (0)