Skip to content

Conversation

@pepelsbey
Copy link
Member

@pepelsbey pepelsbey commented Nov 11, 2025

Description

It’s an automation script that helps to create Firefox release notes.

I created the Firefox 145 release notes PR using this script.

Motivation

To simplify release notes workflow.

Additional details

How it works, for example, with the newly released Firefox 145:

node scripts/content/release-firefox.js 145

What it does:

Takes the newly released version as a parameter (N), and:

  • Removes active from N-1
  • Updates N to Stable
    • Uncomments HTML, CSS, JavaScript “no notable changes” sections
    • Removes all other unused commented sections
  • Updates N+1 to Beta
  • Adds Nightly N+2 page

For release dates, it uses official JSON API — https://whattrainisitnow.com/api/firefox/calendar/future/

Related issues and pull requests

@pepelsbey pepelsbey requested a review from a team as a code owner November 11, 2025 01:47
@pepelsbey pepelsbey requested review from LeoMcA and removed request for a team November 11, 2025 01:47
@github-actions github-actions bot added system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed labels Nov 11, 2025
@pepelsbey pepelsbey force-pushed the firefox-release-script branch from 8cb1954 to 060c4ed Compare November 11, 2025 01:49
@pepelsbey pepelsbey force-pushed the firefox-release-script branch from 060c4ed to d8b6afd Compare November 11, 2025 08:35
@pepelsbey pepelsbey mentioned this pull request Nov 11, 2025
@pepelsbey pepelsbey force-pushed the firefox-release-script branch from d8b6afd to a6b2c34 Compare November 20, 2025 15:43
@pepelsbey pepelsbey requested a review from a team as a code owner November 20, 2025 15:43
@pepelsbey pepelsbey requested review from dipikabh and removed request for a team November 20, 2025 15:43
@github-actions github-actions bot removed the system [PR only] Infrastructure and configuration for the project label Nov 20, 2025
@bsmth
Copy link
Member

bsmth commented Nov 21, 2025

I ran:

node helpers/release-firefox.js 146
# ...
	modified:   files/en-us/mozilla/firefox/releases/145/index.md
	modified:   files/en-us/mozilla/firefox/releases/146/index.md
	modified:   files/en-us/mozilla/firefox/releases/147/index.md
	new file:   files/en-us/mozilla/firefox/releases/148/index.md
  • 145 LGTM
  • 146 LGTM
  • 147 LGTM
  • 148 LGTM

Note that if you run for a past version, you will get:

🦊 Firefox Release Notes Updater

📋 Planned updates:
   Firefox 144 → Remove active status
   Firefox 145 → Stable
   Firefox 146 → Beta
   Firefox 147 → Nightly (new page)

📡 Fetching release dates...
⚠️  Warning: Could not find all release dates.
   Stable (145): NOT FOUND
   Beta (146): 2025-12-09
   Nightly (147): 2026-01-13

❌ Error: Missing required release dates. Cannot proceed.

So I presume in the current state, if you run this on or after the day of release, it will trip on that.

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing to sort is where it lives, but once it's in a good home, this is good to merge, IMO. Do we want to couple this with a CODEOWNER change for convenience?

@Josh-Cena
Copy link
Member

Any problem with just putting all scripts under scripts/?

@pepelsbey
Copy link
Member Author

Any problem with just putting all scripts under scripts/?

That's what I initially thought. But it turned out we need to differentiate content helpers from scripts used for build and CI, as they have different levels of importance and need to be reviewed by the engineering team.

@Josh-Cena
Copy link
Member

You can just add another entry in the CODEOWNERS file though. Earlier entries override later ones.

@bsmth
Copy link
Member

bsmth commented Nov 24, 2025

You can just add another entry in the CODEOWNERS file though. Earlier entries override later ones.

If it's in ./scripts/content, for example, CODEOWNERS could look like:

# Scripts and Tests
/scripts @mdn/engineering
+/scripts/content @mdn/content-team
/tests   @mdn/engineering

@pepelsbey pepelsbey force-pushed the firefox-release-script branch from a6b2c34 to 1375115 Compare December 2, 2025 16:11
@github-actions github-actions bot added the system [PR only] Infrastructure and configuration for the project label Dec 2, 2025
@pepelsbey pepelsbey requested a review from bsmth December 2, 2025 16:17
@pepelsbey
Copy link
Member Author

@bsmth Thanks! I implemented your suggestions:

  • Moved script to the scripts/content subfolder.
  • Changed CODEOWNERS.
  • Split template into a Markdown file.

It looks ready for the upcoming release project :)

@pepelsbey pepelsbey requested a review from caugner December 2, 2025 17:18
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks. Tested again with:

node scripts/content/release-firefox.js 146

And works as expected 👍🏻

@pepelsbey pepelsbey merged commit 357fa62 into mdn:main Dec 3, 2025
8 checks passed
@pepelsbey
Copy link
Member Author

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m [PR only] 51-500 LoC changed system [PR only] Infrastructure and configuration for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants