Skip to content

Commit 94fdc38

Browse files
blakeffacebook-github-bot
authored andcommitted
fix: mitigate DangerJS transpilation bug (#47192)
Summary: Danger seems to have a bug where it's not transpiling the import of rnx-kit/rn-changelog-generator. This mitigates the issue to get our project back on track. This can be replicated locally by: ```bash DEBUG="*" DANGER_GITHUB_API_TOKEN=$GITHUB_TOKEN yarn danger pr #47182 ``` You can see it running correctly here when switching to the branch with the fix. **I'm a little concerned that this is still failing on the PR**. Thoughts? {F1946190275} Changelog: [internal] Pull Request resolved: #47192 Reviewed By: cortinico Differential Revision: D64924466 Pulled By: blakef fbshipit-source-id: 68df0521620809effe3a78ce842e043382ad64a6
1 parent e851e73 commit 94fdc38

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/react-native-bots/dangerfile.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
*/
99

1010
'use strict';
11-
12-
const {validate: validateChangelog} =
13-
require('@rnx-kit/rn-changelog-generator').default;
1411
const {danger, fail, /*message,*/ warn} = require('danger');
1512
const includes = require('lodash.includes');
1613

@@ -60,7 +57,9 @@ if (!includesTestPlan && !isFromPhabricator) {
6057

6158
// Check if there is a changelog and validate it
6259
if (!isFromPhabricator) {
63-
const status = validateChangelog(danger.github.pr.body);
60+
const status = require('@rnx-kit/rn-changelog-generator').default.validate(
61+
danger.github.pr.body,
62+
);
6463
const changelogInstructions =
6564
'See <a target="_blank" href="https://reactnative.dev/contributing/changelogs-in-pull-requests">Changelog format</a>';
6665
if (status === 'missing') {

0 commit comments

Comments
 (0)