|
| 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