Skip to content

Commit 45731ac

Browse files
committed
chore: formatting
1 parent 6fbc248 commit 45731ac

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/comment-diffs.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
--no-example \
3838
--no-local
3939
40+
- name: Store the commit hash
41+
id: head_hash
42+
run: echo "HEAD_HASH=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
43+
4044
- name: Fetch main
4145
run: git fetch origin main
4246

@@ -69,31 +73,23 @@ jobs:
6973
- name: Diff the libraries
7074
id: diff
7175
run: |
72-
diff -r --no-ignore-file-name-case old-version new-version >> DEBUG.txt || true # Just for debugging, promise I'll delete it
7376
echo "DIFF_RESULT<<EOF" >> $GITHUB_OUTPUT
74-
diff -r --no-ignore-file-name-case old-version new-version >> $GITHUB_OUTPUT || true
77+
# Diff in recursive mod with unified format (unified format uses - and + instead of < and >)
78+
diff -r -u --no-ignore-file-name-case old-version new-version >> $GITHUB_OUTPUT || true
7579
echo "EOF" >> $GITHUB_OUTPUT
7680
77-
78-
- name: Ls dirs
79-
run: |
80-
cat DEBUG.txt
81-
ls -R old-version
82-
ls -R new-version
83-
84-
- name: Cat diff
85-
run: |
86-
cat DEBUG.txt
87-
8881
- name: Comment on PR
8982
uses: actions/github-script@v3
9083
with:
9184
github-token: ${{secrets.GITHUB_TOKEN}}
9285
script: |
93-
const body = `The diff
86+
const body = `The commit with hash: ${{ steps.head_hash.outputs.HEAD_HASH }} has changed the output of \`create-react-native-library\`. You can find the diff of the change below:
87+
9488
\`\`\`diff
9589
${{ steps.diff.outputs.DIFF_RESULT }}
9690
\`\`\`
91+
92+
> This diff is between this branch and the \`main\` branch.
9793
`;
9894
9995
const comments = await github.issues.listComments({

0 commit comments

Comments
 (0)