@rnw-scripts/generate-release-notes 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +11 -3
- package/ReadMe.md +14 -8
- package/generate-release-notes.js +7 -4
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@rnw-scripts/generate-release-notes",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 06 Aug 2025 05:27:14 GMT",
|
|
6
|
+
"version": "1.0.2",
|
|
7
|
+
"tag": "@rnw-scripts/generate-release-notes_v1.0.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "54227869+anupriya13@users.noreply.github.com",
|
|
12
|
+
"package": "@rnw-scripts/generate-release-notes",
|
|
13
|
+
"commit": "16aba2428a8207e5247a808ce03a68d7ef2d42d0",
|
|
14
|
+
"comment": "Update ReadMe for Release Notes Generation Script"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 22 Jul 2025 05:26:15 GMT",
|
|
6
21
|
"version": "1.0.1",
|
|
7
22
|
"tag": "@rnw-scripts/generate-release-notes_v1.0.1",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# Change Log - @rnw-scripts/generate-release-notes
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Wed, 06 Aug 2025 05:27:14 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 1.0.
|
|
7
|
+
## 1.0.2
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Wed, 06 Aug 2025 05:27:14 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
+
- Update ReadMe for Release Notes Generation Script (54227869+anupriya13@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
## 1.0.1
|
|
16
|
+
|
|
17
|
+
Tue, 22 Jul 2025 05:26:15 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
13
21
|
- Add a new "yarn release-notes" script to generate release notes (copilot@example.com)
|
package/ReadMe.md
CHANGED
|
@@ -29,15 +29,21 @@ or at least repo:status, repo_deployment, public_repo (for public repos)
|
|
|
29
29
|
- Click that button to authorize the token with the organization.
|
|
30
30
|
- Copy the generated token
|
|
31
31
|
|
|
32
|
-
#### 2. Set
|
|
32
|
+
#### 2. Set variables as params and run "yarn release-notes"
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
Usage:
|
|
36
|
+
yarn release-notes --token <GITHUB_TOKEN> --start <START_DATE> --end <END_DATE> [--repo <OWNER/REPO>] [--tag <RELEASE_TAG>]
|
|
37
|
+
|
|
38
|
+
Options:
|
|
39
|
+
--token (required) GitHub personal access token.
|
|
40
|
+
--start (required) Start date in YYYY-MM-DD.
|
|
41
|
+
--end (required) End date in YYYY-MM-DD.
|
|
42
|
+
--repo Repository in OWNER/REPO format. Default: microsoft/react-native-windows
|
|
43
|
+
--tag Release tag label. Default: Unreleased. Expected: 0.80 or similar
|
|
44
|
+
--help Show this help message.
|
|
40
45
|
```
|
|
41
|
-
#### 3. Run "`yarn release-notes`" at the root of the repo
|
|
42
46
|
|
|
43
|
-
####
|
|
47
|
+
#### 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.
|
|
48
|
+
|
|
49
|
+
#### 4. Verify the release notes generated from all commits section and delete the "All Commits" and "Excluded" sections after validation
|
|
@@ -189,8 +189,8 @@ function shouldIncludeInReleaseNotes(prDescription) {
|
|
|
189
189
|
if (lines.length === 0) return false;
|
|
190
190
|
|
|
191
191
|
// Check if the first non-empty line contains "no" or "_no_"
|
|
192
|
-
const firstLine = lines[0].toLowerCase();
|
|
193
|
-
return !(firstLine
|
|
192
|
+
const firstLine = lines[0].toLowerCase().trim();
|
|
193
|
+
return !(firstLine === 'no' || firstLine === '_no_');
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
function extractReleaseNotesSummary(prDescription) {
|
|
@@ -270,7 +270,8 @@ function extractTypeOfChange(prDescription) {
|
|
|
270
270
|
|
|
271
271
|
async function categorizeCommits(commits) {
|
|
272
272
|
const categories = {
|
|
273
|
-
'All Commits': [],
|
|
273
|
+
'All Commits [REVIEW ONLY]': [],
|
|
274
|
+
'Excluded [REVIEW ONLY]': [],
|
|
274
275
|
'Breaking Changes': [],
|
|
275
276
|
'New Features': [],
|
|
276
277
|
'Reliability': [],
|
|
@@ -331,6 +332,8 @@ async function categorizeCommits(commits) {
|
|
|
331
332
|
console.log(`PR #${prNumber}: Type of Change = "${typeOfChange}", Category = "${category}"`);
|
|
332
333
|
} else {
|
|
333
334
|
console.log(`Skipping PR #${prNumber} - not marked for inclusion in release notes`);
|
|
335
|
+
const excluded = `- ${commitTitle} [${commitTitle} · ${REPO}@${sha} (github.com)](${url})`;
|
|
336
|
+
categories['Excluded [REVIEW ONLY]'].push(excluded);
|
|
334
337
|
continue; // Skip this commit
|
|
335
338
|
}
|
|
336
339
|
}
|
|
@@ -338,7 +341,7 @@ async function categorizeCommits(commits) {
|
|
|
338
341
|
|
|
339
342
|
const entry = `- ${summary} [${commitTitle} · ${REPO}@${sha} (github.com)](${url})`;
|
|
340
343
|
|
|
341
|
-
categories['All Commits'].push(entry);
|
|
344
|
+
categories['All Commits [REVIEW ONLY]'].push(entry);
|
|
342
345
|
categories[category].push(entry);
|
|
343
346
|
}
|
|
344
347
|
|