Skip to content

Conversation

@anupriya13
Copy link
Contributor

@anupriya13 anupriya13 commented Jul 16, 2025

Description

Type of Change

  • Automate release notes creation by adding a new yarn script

Why

To save us some time when generating release notes.

Estimated time to generate release notes now after this script will be less than 30 mins.!!!

Resolves #14906

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

This script does these tasks:

  • Fetches Changelog in PR description "yes" or "no" -> if yes then includes that PR in Release notes else not.
  • Fetches Changelog summary provided by PR owner
  • Fetches all commits from specific start date to end date
  • Formats in correct way as expected
  • Categorises the PR into correct section in Release notes.
  • Creates a section of All Commits to validate the categorisation and summary, this section can be deleted from actual release notes after verification.

Steps to follow

1. Set up your personal access token

  • Go to GitHub and log in: https://github.com/
  • Click on your profile picture (top-right corner), then click Settings
  • On the left sidebar, click Developer settings
  • Then click Personal access tokens > Tokens (classic)
  • Click Generate new token > Generate new token (classic)
  • Give it a name like "Release Notes Script"
  • Set an expiration (choose less than 90 days)
  • Under Scopes, select the permissions your script needs. For fetching commits and repo info, you typically need:
    repo (full control of private repositories)
    or at least repo:status, repo_deployment, public_repo (for public repos)
  • Click Generate token
  • Find the token you're using (whichever token you created).
  • You should see a message or option to "Grant access to your organization" or "Authorize SAML SSO" for your token.
  • Click that button to authorize the token with the organization.
  • Copy the generated token

2. Set variables as params and run "yarn release-notes"

Usage:
  yarn release-notes --token <GITHUB_TOKEN> --start <START_DATE> --end <END_DATE> [--repo <OWNER/REPO>] [--tag <RELEASE_TAG>]

Options:
  --token       (required) GitHub personal access token.
  --start       (required) Start date in YYYY-MM-DD.
  --end         (required) End date in YYYY-MM-DD.
  --repo        Repository in OWNER/REPO format. Default: microsoft/react-native-windows
  --tag         Release tag label. Default: Unreleased. Expected: 0.80 or similar
  --help        Show this help message.

3. You will see a release-notes.md file generated at packages@rnw-scripts\generate-release-notes\release_notes.md which will have all the data you need.

4. Verify the release notes generated from all commits section and delete the "all commits" section after validation

Screenshots

Add any relevant screen captures here from before or after your changes.

automate.0.80.mp4

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Optional: Describe the tests that you ran locally to verify your changes.
image
image

Tested locally and attached video

Changelog

Should this change be included in the release notes: no

Add a brief summary of the change to use in the release notes for the next release.

Copilot AI and others added 2 commits July 16, 2025 13:53
…14931)

* Initial plan

* Add @rnw-scripts/generate-release-notes package with updated version and dates

Co-authored-by: anupriya13 <[email protected]>

* Update package.json with proper repository info and improve .gitignore

Co-authored-by: anupriya13 <[email protected]>

* Improve commit summaries by extracting release notes from PR descriptions

Co-authored-by: anupriya13 <[email protected]>

* Add PR inclusion filtering and Microsoft Reviewers cleanup logic

Co-authored-by: anupriya13 <[email protected]>

* update logic

* Improve categorization logic based on PR Type of Change section

Co-authored-by: anupriya13 <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: anupriya13 <[email protected]>
@anupriya13 anupriya13 marked this pull request as ready for review July 16, 2025 08:58
@anupriya13 anupriya13 requested a review from a team as a code owner July 16, 2025 08:58
Copy link
Contributor

@satkh satkh left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Contributor

@iamAbhi-916 iamAbhi-916 left a comment

Choose a reason for hiding this comment

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

Looks good to me, lets cross check manually for 0.80 release if any tweaks are required

@anupriya13
Copy link
Contributor Author

Looks good to me, lets cross check manually for 0.80 release if any tweaks are required

Already tested with 0.80 start and end date commits, if we see any improvements that can be done here can be taken as enhancement in future PRs. Merging now.

@anupriya13 anupriya13 merged commit 4f7ec11 into main Jul 21, 2025
58 checks passed
Copy link
Contributor

@sharath2727 sharath2727 left a comment

Choose a reason for hiding this comment

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

Approved with small nits.

// Extract the next line or paragraph after the marker
const lines = afterMarker.split('\n').map(line => line.trim()).filter(line => line.length > 0);

if (lines.length === 0) return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "==" ?

const marker = 'Should this change be included in the release notes:';
const markerIndex = prDescription.indexOf(marker);

if (markerIndex === -1) return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

return false?

@anupriya13 anupriya13 deleted the AUTOMATE_0.80_RN branch August 8, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate Creation of Release Notes

5 participants