Commit 996fa6e
authored
fix(review): trim LOOPOVER_PUBLIC_STATS before the truthy-flag regex test (#10344)
isPublicStatsEnabled tested the raw, untrimmed env value against the anchored
/^(1|true|yes|on)$/i regex, while every sibling flag-checker in the codebase (e.g.
pr-reconciliation.ts's isPrReconciliationEnabled) trims first. A trailing newline or
surrounding whitespace -- plausible from wrangler secret put reading a file, or a
CI/CD-injected env var carrying a trailing newline -- made the anchored regex fail to
match even though the operator clearly meant to enable the flag: the test of 'true\n'
was false. Trim the value before the regex, matching the established convention. The
manifestOverride early-return and every already-clean value are unchanged.
Closes #103291 parent 5b95330 commit 996fa6e
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
0 commit comments