Skip to content

Commit ce18036

Browse files
turnryefacebook-github-bot
authored andcommitted
Make PR template consistent with Changelog (facebook#22117)
Summary: In the new changelog format, we're following [Keep a Changelog](https://keepachangelog.com/en/1.0.0). This change updates the PR template to follow their change types, plus it simplifies the *CATEGORY* field to follow the changelog's groupings. Some simplified examples have been provided, though I plan to revisit this after 0.58 to add real-world examples. This change is motivated by react-native-community/releases#47. Pull Request resolved: facebook#22117 Differential Revision: D12919271 Pulled By: TheSavior fbshipit-source-id: 91f063f769357b24383db281545678b924ad3efb
1 parent b01bf06 commit ce18036

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,37 @@ Test Plan:
99
----------
1010
Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
1111

12-
Release Notes:
13-
--------------
14-
Help reviewers and the release process by writing your own release notes. See below for an example.
12+
Changelog:
13+
----------
14+
Help reviewers and the release process by writing your own changelog entry. When the change doesn't impact React Native developers, it may be ommitted from the changelog for brevity. See below for an example.
1515

16-
[CATEGORY] [TYPE] [LOCATION] - Message
16+
[CATEGORY] [TYPE] - Message
1717

1818
<!--
19-
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
20-
21-
CATEGORY
22-
[----------] TYPE
23-
[ CLI ] [-------------] LOCATION
24-
[ DOCS ] [ BREAKING ] [-------------]
25-
[ GENERAL ] [ BUGFIX ] [ {Component} ]
26-
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
27-
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
28-
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
29-
[----------] [-------------] [-------------] |-----------|
30-
31-
EXAMPLES:
32-
33-
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
34-
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
35-
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
36-
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
37-
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
38-
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
39-
-->
19+
20+
CATEGORY may be:
21+
22+
- [General]
23+
- [iOS]
24+
- [Android]
25+
26+
TYPE may be:
27+
28+
- [Added] for new features.
29+
- [Changed] for changes in existing functionality.
30+
- [Deprecated] for soon-to-be removed features.
31+
- [Removed] for now removed features.
32+
- [Fixed] for any bug fixes.
33+
- [Security] in case of vulnerabilities.
34+
35+
For more detail, see https://keepachangelog.com/en/1.0.0/#how
36+
37+
MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.
38+
39+
EXAMPLES:
40+
41+
[General] [Added] - Add snapToOffsets prop to ScrollView component
42+
[General] [Fixed] - Fix various issues in snapToInterval on ScrollView component
43+
[iOS] [Fixed] - Fix crash in RCTImagePicker
44+
45+
-->

bots/dangerfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (!includesTestPlan) {
3939
}
4040

4141
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
42-
const releaseNotesRegex = /\[\s?(ANDROID|CLI|DOCS|GENERAL|INTERNAL|IOS|TVOS|WINDOWS)\s?\]\s*?\[\s?(BREAKING|BUGFIX|ENHANCEMENT|FEATURE|MINOR)\s?\]\s*?\[(.*)\]\s*?\-\s*?(.*)/gi;
42+
const releaseNotesRegex = /\[\s?(ANDROID|GENERAL|IOS)\s?\]\s*?\[\s?(ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY)\s?\]\s*?\-\s*?(.*)/gi;
4343
const includesReleaseNotes =
4444
danger.github.pr.body &&
4545
danger.github.pr.body.toLowerCase().includes('release notes');

0 commit comments

Comments
 (0)