You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Pull Request resolved: facebook#48470
This introduces:
- `validate_rn_cpp_api`: run a shell script that fails if the user changes the C++ API. Importantly it produces an artifact with details to share with the user: `message`.
- `message` has to be extracted from `stdout`, which **get_user_message** does if the `validate_rn_cpp_api` action is not successful (**warning**).
- The then users `comment_to_signalhub` to share this as a warning to the user (until we're confident this entire stack is very stable, at which time we'll block).
The provides 2 classes of warning:
1. vanilla you've change the API,
2. you've change the API and haven't included the correct changelog.
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D67776215
fbshipit-source-id: 4ac7451c8ecef62ba968710ec41804ba42153976
# Delimit what we share with the users in PR / diffs
14
+
MSG_START="=== MSG_START ==="
15
+
MSG_END="=== MSG_END ==="
16
+
13
17
WARNING_MESSAGE_HEADER=$(cat <<EOF
14
-
🚨 React Native Public C++ / Objective-C / Objective-C++ API Change Detected:
18
+
# React Native Public C++ / Objective-C / Objective-C++ API Change Detected:
15
19
16
20
It looks like you've changed a public API that could affect our users, potentially breaking libraries and/or products using React Native.
17
21
EOF
18
22
)
19
23
20
24
WARNING_MESSAGE_TAIL=$(cat <<EOF
21
25
22
-
What to do now?
23
-
---------------
26
+
### What to do now?
24
27
25
28
Nothing for now, we're just tracking this. In the future we'll start adding folks from React Org as reviewers to check these changes align with our public API policy.
26
29
@@ -29,13 +32,12 @@ EOF
29
32
30
33
ERROR_MENTION_BREAKING_CHANGE=$(cat <<EOF
31
34
32
-
Commit Message:
33
-
---------------
35
+
## Commit Message:
34
36
35
37
If you did not intend to change React Native's Public API, please revert those changes in this commit. If you did intend to change the Public API, You *MUST* add a changelog entry to your commit message using the "Breaking" type (https://reactnative.dev/contributing/changelogs-in-pull-requests). For example:
36
38
37
-
## Changelog:
38
-
[General][Breaking] - Removed the Foo method to Bar as part of our deprecation mentioned in RFC-123
39
+
## Changelog:
40
+
[General][Breaking] - Removed the Foo method to Bar as part of our deprecation mentioned in RFC-123
39
41
40
42
EOF
41
43
)
@@ -44,6 +46,7 @@ function check_if_mentions_breaking_change() {
0 commit comments