Skip to content

Commit

Permalink
fix(internal, dangerfile): fix changelog entries for dangerfiles and …
Browse files Browse the repository at this point in the history
…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: #35443 (comment)

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: facebook/react-native-website#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: #35541

Test Plan: N/A

Reviewed By: sammy-SC

Differential Revision: D41686913

Pulled By: cortinico

fbshipit-source-id: 2297b4a3209188bda4a609b60860de35c5e7e6df
  • Loading branch information
kelset authored and facebook-github-bot committed Dec 5, 2022
1 parent 1d4396c commit e509007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion packages/react-native-bots/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit e509007

Please sign in to comment.