fix(internal, dangerfile): fix changelog entries for dangerfiles and PR template (#35541)

Summary:
A few days back leotm pointed out how the dangerfile was disaligned with the docs around the valid changelog entries for categories and types here: https://github.com/facebook/react-native/pull/35443#issuecomment-1327449113

I dug a bit deeper into the whole thing and went to the source of truth, which is the changelog generator, in particular here: https://github.com/microsoft/rnx-kit/blob/main/incubator/rn-changelog-generator/src/utils/getChangeDimensions.ts

So I've updated the dangerfile to respect the options listed there. Also did a parallel PR on the website side: https://github.com/facebook/react-native-website/pull/3447

So now all comms will be aligned.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [FIXED] - fix changelog entries for dangerfiles and PR template

Pull Request resolved: https://github.com/facebook/react-native/pull/35541

Test Plan: N/A

Reviewed By: sammy-SC

Differential Revision: D41686913

Pulled By: cortinico

fbshipit-source-id: 2297b4a3209188bda4a609b60860de35c5e7e6df
This commit is contained in:
Lorenzo Sciandra 2022-12-05 02:38:42 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 1d4396c9d7
Коммит e509007f57
2 изменённых файлов: 8 добавлений и 4 удалений

10
.github/PULL_REQUEST_TEMPLATE.md поставляемый
Просмотреть файл

@ -6,12 +6,16 @@
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[CATEGORY] [TYPE] - Message
## Test Plan
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->

2
packages/react-native-bots/dangerfile.js поставляемый
Просмотреть файл

@ -59,7 +59,7 @@ if (!includesTestPlan && !isFromPhabricator) {
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
const changelogRegex =
/\[\s?(ANDROID|GENERAL|IOS|JS|JAVASCRIPT|INTERNAL)\s?\]\s?\[\s?(ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY)\s?\]\s*?-?\s*?(.*)/gi;
/\[\s?(ANDROID|GENERAL|IOS|INTERNAL)\s?\]\s?\[\s?(BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY)\s?\]\s*?-?\s*?(.*)/gi;
const internalChangelogRegex = /\[\s?(INTERNAL)\s?\].*/gi;
const includesChangelog =
danger.github.pr.body &&