Skip to content

Instantly share code, notes, and snippets.

@pascalchevrel
Last active October 8, 2025 14:07
Show Gist options
  • Select an option

  • Save pascalchevrel/d42147b95022feba2d2201a9cc27dca4 to your computer and use it in GitHub Desktop.

Select an option

Save pascalchevrel/d42147b95022feba2d2201a9cc27dca4 to your computer and use it in GitHub Desktop.
Soft code freeze email
<?php
date_default_timezone_set('UTC');
$api_endpoint = 'https://whattrainisitnow.com/api';
function convertJson(string $url): array {
return json_decode(file_get_contents($url), true);
}
$version = 'nightly';
$max_version = convertJson($api_endpoint . '/firefox/calendar/future/');
$max_version = end($max_version)['version'];
// Allow to give a version number, sanity check it's valid
if (isset($_GET['version'])) {
$_GET['version'] = intval($_GET['version']);
if ($_GET['version'] > 100 && $_GET['version'] < $max_version) {
$version = $_GET['version'];
}
}
$nightly_schedule = convertJson($api_endpoint . '/release/schedule/?version=' . $version);
if (isset($nightly_schedule['error'])) {
die("Please provide a valid version number");
}
define('UPCOMING_BETA', (int) $nightly_schedule['version']); // upcoming version entering RC
define('RELMAN', convertJson($api_endpoint . '/release/owners/')[UPCOMING_BETA] . PHP_EOL);
$date_format = fn($d) => new DateTime()->createFromFormat('Y-m-d H:i:sP', $d)->format('l, F j');
define('FROM', $date_format($nightly_schedule['soft_code_freeze']));
define('TO', $date_format($nightly_schedule['merge_day']));
define('STRING_FREEZE', $date_format($nightly_schedule['string_freeze']));
const RC = UPCOMING_BETA - 1;
const FUTURE_NIGHTLY = UPCOMING_BETA + 1;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Soft code Freeze email</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
<script>
function copyToClipBoard(targetId, buttonElement) {
const element = document.getElementById(targetId);
if (!element) {
console.error("Element not found.");
return;
}
const text = element.innerText || element.textContent;
navigator.clipboard.writeText(text).then(() => {
const originalText = buttonElement.innerText;
const originalBackground = buttonElement.style.backgroundColor;
buttonElement.innerText = "Copied!";
buttonElement.style.backgroundColor = "green";
setTimeout(() => {
buttonElement.innerText = originalText;
buttonElement.style.backgroundColor = originalBackground;
}, 1000);
}).catch((err) => {
console.error("Failed to copy: ", err);
});
}
</script>
<style>
button {
float: right;
}
</style>
</head>
<body>
<main class="container">
<div>
<textarea id="textArea" style="min-width:55em; min-height: 52em;">
Soft code freeze for Firefox <?=UPCOMING_BETA?> starts on <?=FROM?> @ 8am UTC
Hello,
With Firefox <?=RC?> in the Release Candidate phase this week, we are nearing the end of the Nightly <?=UPCOMING_BETA?> cycle
In order to avoid invalidating the testing we get out of late Nightly and to ensure that we can roll out Beta <?=UPCOMING_BETA?> to a wider audience with confidence next week, we'd like to ask that any risky changes be avoided from <?=FROM?> until after the version bump to <?=FUTURE_NIGHTLY?> on <?=TO?>.
Also, please be advised that string freeze for Firefox <?=UPCOMING_BETA?> begins <?=STRING_FREEZE?>. In order to ensure that our localizers have adequate time to translate strings, please make sure that all string changes have landed by EOD Friday.
Some reminders for the soft code freeze period:
Do:
- Be ready to back out patches that cause crash spikes, new crashes, severe regressions
- Monitor new regressions and escalate merge blockers
- Support release management by prioritizing fixing of merge blockers
Do Not:
- Land a risky patch or a large patch
- Land new features (that affect the current Nightly version) — be mindful that code behind NIGHTLY_BUILD or RELEASE_OR_BETA ifdefs can lead to unexpected CI results
- Flip prefs that enable new Features that were untested in the Nightly cycle
- Plan to kick off new experiments that might impact a feature's merge readiness
Please let us know if you have any questions/concerns.
Thanks,
<?=RELMAN?>
Firefox Release Manager</textarea>
<div>
<button onclick="copyToClipBoard('textArea', this)">Copy</button>
</div>
</div>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment