Skip to content

Commit 6e047d1

Browse files
committed
chore: testing
1 parent f4659e7 commit 6e047d1

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

.github/workflows/comment-diffs.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,13 @@ jobs:
117117
done
118118
done
119119
120-
- name: Switch to diffs branch
120+
- name: Remove everything
121+
run: rm -rf *
122+
123+
- name: Checkout
124+
# uses: checkout
121125
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
132127
133128
- name: Initiate diffs
134129
id: create-diffs
@@ -265,28 +260,11 @@ jobs:
265260
with:
266261
github-token: ${{secrets.GITHUB_TOKEN}}
267262
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-
281263
const artifacts = `${{ steps.artifacts.outputs.ARTIFACTS }}`;
282264
283-
const artifactsReplaced = Object.entries(replaceTable).reduce((acc, [key, value]) => {
284-
return acc.replace(new RegExp(key, "g"), value);
285-
}, artifacts)
286-
287265
const body = `🤓☝️ This PR changes the output of \`create-react-native-library\`. You can find the diffs of effected templates below:
288266
289-
${artifactsReplaced}
267+
${artifacts}
290268
`;
291269
292270
const comments = await github.issues.listComments({

0 commit comments

Comments
 (0)