Skip to content

Commit 4e0628f

Browse files
committed
chore: cleanup
1 parent a477ad4 commit 4e0628f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/comment-diffs.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ jobs:
129129
- name: Remove everything
130130
run: for i in $(ls) ; do rm -rf "$i"; done;
131131

132-
- name: Checkout
133-
# uses: checkout
134-
run: |
135-
git init
132+
- name: Create new empty repo
133+
run: git init
136134

137135
- name: Initiate diffs
138136
id: create-diffs
@@ -141,9 +139,9 @@ jobs:
141139
source ../configMatrix/configMatrix.sh
142140
143141
output_path="../outputs"
144-
145142
mkdir -p "$output_path"
146143
144+
# Set author
147145
git config --global user.email "text@test.com"
148146
git config --global user.name "Github actions test"
149147
@@ -225,7 +223,7 @@ jobs:
225223
echo "DIFF_IS_NON_EMPTY=0" >> $GITHUB_OUTPUT
226224
fi
227225
228-
# Remove outputs if it exists
226+
# Remove outputs folder in cwd if it exists
229227
rm -rf ./outputs || true
230228
231229
# Copy the outputs to cwd
@@ -285,13 +283,13 @@ jobs:
285283
const parsedArtifacts = fs.readdirSync('./outputs').map(fileName => {
286284
const [type, language] = fileName.split("+");
287285
288-
const header = Object.entries(replaceTable).reduce((acc, [key, value]) => {
286+
const title = Object.entries(replaceTable).reduce((acc, [key, value]) => {
289287
return acc.replace(new RegExp(key, "g"), value);
290288
}, `${language} ${type}`);
291289
292290
const fileContents = fs.readFileSync(`./outputs/${fileName}`, 'utf8');
293291
294-
return `<details><summary>${header}</summary>\n\n\`\`\`diff\n${fileContents}\n\`\`\`\n</details>\n\n`;
292+
return `<details><summary>${title}</summary>\n\n\`\`\`diff\n${fileContents}\n\`\`\`\n</details>\n\n`;
295293
})
296294
297295
const body = `🤓☝️ This PR changes the output of \`create-react-native-library\`. You can find the diffs of effected templates below:

0 commit comments

Comments
 (0)