@@ -117,18 +117,13 @@ jobs:
117
117
done
118
118
done
119
119
120
- - name : Switch to diffs branch
120
+ - name : Remove everything
121
+ run : rm -rf *
122
+
123
+ - name : Checkout
124
+ # uses: checkout
121
125
run : |
122
- desired_branch="diffs"
123
- # Check if the branch exists on the remote repository
124
- if git ls-remote --heads origin "$desired_branch" | grep -q "$desired_branch"; then
125
- echo "The branch $desired_branch already exists on the remote repository."
126
- git fetch origin "$desired_branch" # Fetch the branch from the remote
127
- git checkout "$desired_branch" # Switch to the existing branch
128
- else
129
- echo "The branch $desired_branch does not exist on the remote repository."
130
- git checkout -b "$desired_branch" # Create a new branch and switch to it
131
- fi
126
+ git init
132
127
133
128
- name : Initiate diffs
134
129
id : create-diffs
@@ -265,28 +260,11 @@ jobs:
265
260
with :
266
261
github-token : ${{secrets.GITHUB_TOKEN}}
267
262
script : |
268
- const replaceTable = {
269
- "module-legacy": "Native module",
270
- "module-mixed": "Turbo module with backward compat",
271
- "module-new": "Turbo module",
272
- "view-legacy": "Native view",
273
- "view-mixed": "Fabric view with backward compat",
274
- "view-new": "Fabric view",
275
- "java-objc": "Java and Objective C",
276
- "java-swift": "Java and Swift",
277
- "kotlin-objc": "Kotlin and Objective C",
278
- "kotlin-swift": "Kotlin and Swift"
279
- }
280
-
281
263
const artifacts = `${{ steps.artifacts.outputs.ARTIFACTS }}`;
282
264
283
- const artifactsReplaced = Object.entries(replaceTable).reduce((acc, [key, value]) => {
284
- return acc.replace(new RegExp(key, "g"), value);
285
- }, artifacts)
286
-
287
265
const body = `🤓☝️ This PR changes the output of \`create-react-native-library\`. You can find the diffs of effected templates below:
288
266
289
- ${artifactsReplaced }
267
+ ${artifacts }
290
268
`;
291
269
292
270
const comments = await github.issues.listComments({
0 commit comments