react-native-builder-bob icon indicating copy to clipboard operation
react-native-builder-bob copied to clipboard

chore: comment diffs automatically

Open atlj opened this issue 2 years ago • 9 comments

Summary:

This adds a new workflow that comments on the generated library diffs to your PR if you change a template.

How does it work?

This workflow automatically creates all possible libraries from your branch, then it does the same from the main branch. Lastly, it compares the generated libraries and comments on the diffs.

Notes:

  1. This PR also changes the install action to leverage yarn3's caching mechanisms.

atlj avatar Oct 06 '23 15:10 atlj

The diff

github-actions[bot] avatar Oct 06 '23 15:10 github-actions[bot]

The diff diff -r --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java 8a9

// Hi mom! diff -r --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js 1a2 // Hi mom! diff -r --no-ignore-file-name-case old-version/package.json new-version/package.json 68c68 < "react-native-builder-bob": "^0.20.0",


"react-native-builder-bob": "^0.23.1",

github-actions[bot] avatar Oct 06 '23 17:10 github-actions[bot]

The diff

diff -r --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
8a9
> // Hi mom!
diff -r --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
1a2
>   // Hi mom!
diff -r --no-ignore-file-name-case old-version/package.json new-version/package.json
68c68
<     "react-native-builder-bob": "^0.20.0",
---
>     "react-native-builder-bob": "^0.23.1",

github-actions[bot] avatar Oct 06 '23 17:10 github-actions[bot]

This PR changes the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 17:59:32.000000000 +0000
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 17:59:26.000000000 +0000
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js	2023-10-06 17:59:32.000000000 +0000
+++ new-version/babel.config.js	2023-10-06 17:59:26.000000000 +0000
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };
diff -r -u --no-ignore-file-name-case old-version/package.json new-version/package.json
--- old-version/package.json	2023-10-06 17:59:32.000000000 +0000
+++ new-version/package.json	2023-10-06 17:59:26.000000000 +0000
@@ -65,7 +65,7 @@
     "prettier": "^2.0.5",
     "react": "17.0.2",
     "react-native": "0.70.0",
-    "react-native-builder-bob": "^0.23.1",
+    "react-native-builder-bob": "^0.20.0",
     "release-it": "^15.0.0",
     "typescript": "^5.0.2"
   },

This diff is between 975d1f7861ea408e11a6f52158281ebf67aa5ad9 and the main branch.

github-actions[bot] avatar Oct 06 '23 17:10 github-actions[bot]

The commit with hash: 2827e6250e3dca30e420353eb66dd9586979149c has changed the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 17:59:53.000000000 +0000
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 17:59:43.000000000 +0000
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js	2023-10-06 17:59:53.000000000 +0000
+++ new-version/babel.config.js	2023-10-06 17:59:43.000000000 +0000
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };

This diff is between this branch and the main branch.

github-actions[bot] avatar Oct 06 '23 17:10 github-actions[bot]

This PR changes the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:06:19.000000000 +0000
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:06:13.000000000 +0000
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js	2023-10-06 18:06:19.000000000 +0000
+++ new-version/babel.config.js	2023-10-06 18:06:13.000000000 +0000
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };

This diff is between 69b58ba9fced328a3e141a38c8c95377c1531baa and the main branch.

github-actions[bot] avatar Oct 06 '23 18:10 github-actions[bot]

This PR changes the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:15:34.000000000 +0000
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:15:28.000000000 +0000
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js	2023-10-06 18:15:34.000000000 +0000
+++ new-version/babel.config.js	2023-10-06 18:15:28.000000000 +0000
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };
diff -r -u --no-ignore-file-name-case old-version/package.json new-version/package.json
--- old-version/package.json	2023-10-06 18:15:34.000000000 +0000
+++ new-version/package.json	2023-10-06 18:15:28.000000000 +0000
@@ -65,7 +65,7 @@
     "prettier": "^2.0.5",
     "react": "17.0.2",
     "react-native": "0.70.0",
-    "react-native-builder-bob": "^0.23.1",
+    "react-native-builder-bob": "^0.20.0",
     "release-it": "^15.0.0",
     "typescript": "^5.0.2"
   },

This diff is between bf4e03bcae26d9357a3c285831d0ef17266d3f78 and the main branch.

github-actions[bot] avatar Oct 06 '23 18:10 github-actions[bot]

This PR changes the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:22:10.000000000 +0000
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java	2023-10-06 18:22:04.000000000 +0000
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js	2023-10-06 18:22:10.000000000 +0000
+++ new-version/babel.config.js	2023-10-06 18:22:04.000000000 +0000
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };
diff -r -u --no-ignore-file-name-case old-version/package.json new-version/package.json
--- old-version/package.json	2023-10-06 18:22:10.000000000 +0000
+++ new-version/package.json	2023-10-06 18:22:04.000000000 +0000
@@ -65,7 +65,7 @@
     "prettier": "^2.0.5",
     "react": "17.0.2",
     "react-native": "0.70.0",
-    "react-native-builder-bob": "^0.20.0",
+    "react-native-builder-bob": "^0.23.1",
     "release-it": "^15.0.0",
     "typescript": "^5.0.2"
   },

github-actions[bot] avatar Oct 06 '23 18:10 github-actions[bot]

This PR changes the output of create-react-native-library. You can find the diff of the change below:

diff -r -u --no-ignore-file-name-case old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
--- old-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ new-version/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -6,6 +6,7 @@
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactMethod;
 
+// Hi mom!
 public class ReactNativeTestModule extends ReactNativeTestSpec {
   public static final String NAME = "ReactNativeTest";
 
diff -r -u --no-ignore-file-name-case old-version/babel.config.js new-version/babel.config.js
--- old-version/babel.config.js
+++ new-version/babel.config.js
@@ -1,3 +1,4 @@
 module.exports = {
+  // Hi mom!
   presets: ['module:metro-react-native-babel-preset'],
 };

github-actions[bot] avatar Oct 06 '23 18:10 github-actions[bot]