Skip to content

Commit 4f7ec11

Browse files
anupriya13Copilot
andauthored
Automate Creation of Release Notes with yarn script (#14932)
* Automate Creation of Release Notes with yarn script for version 0.80 (#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]> * Update yarn.lock * Use params instead of global and add --help --------- Co-authored-by: Copilot <[email protected]>
1 parent 8f83ec6 commit 4f7ec11

File tree

7 files changed

+499
-0
lines changed

7 files changed

+499
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Add a new \"yarn release-notes\" script to generate release notes",
4+
"packageName": "@rnw-scripts/generate-release-notes",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"format": "format-files -i -style=file",
1313
"format:verify": "format-files -i -style=file -verify",
1414
"postinstall": "yarn build",
15+
"release-notes": "yarn workspace @rnw-scripts/generate-release-notes release-notes",
1516
"spellcheck": "npx cspell",
1617
"test": "lage test --verbose --passWithNoTests",
1718
"validate-overrides": "react-native-platform-override validate"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release_notes.md
2+
sample_release_notes.md
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### Type of Change
2+
Automate release notes creation by adding a new yarn script. Automating the process of creating release notes so that we don't have to manually copy paste the commits.
3+
4+
5+
### Why
6+
To save us some time when generating release notes. Fetches commit from start and end date range, ignores bots and creates the release notes md file. It also categorizes the commits. Please cross-check the generated release-notes.md file and update it manually if required like regrouping commits or updating the Summary/Explanation for the PR commit.
7+
8+
## Format
9+
10+
`Explanation. [PRName (#11168) · microsoft/react-native-windows@aaaaaaa (github.com)](link)`
11+
12+
### Steps to follow
13+
14+
#### 1. Set up your personal access token
15+
16+
- Go to GitHub and log in: https://github.com/
17+
- Click on your profile picture (top-right corner), then click Settings
18+
- On the left sidebar, click Developer settings
19+
- Then click Personal access tokens > Tokens (classic)
20+
- Click Generate new token > Generate new token (classic)
21+
- Give it a name like "Release Notes Script"
22+
- Set an expiration (choose less than 90 days)
23+
- Under Scopes, select the permissions your script needs. For fetching commits and repo info, you typically need:
24+
repo (full control of private repositories)
25+
or at least repo:status, repo_deployment, public_repo (for public repos)
26+
- Click Generate token
27+
- Find the token you're using (whichever token you created).
28+
- You should see a message or option to "Grant access to your organization" or "Authorize SAML SSO" for your token.
29+
- Click that button to authorize the token with the organization.
30+
- Copy the generated token
31+
32+
#### 2. Set env variables at root of the repo
33+
34+
```
35+
set GITHUB_TOKEN=<your-personal-access-token>
36+
set RELEASE_TAG=0.80.0
37+
set START_DATE=2025-06-01
38+
set END_DATE=2025-07-16
39+
40+
```
41+
#### 3. Run "`yarn release-notes`" at the root of the repo
42+
43+
#### 4. 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.

0 commit comments

Comments
 (0)