Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/compare-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=log::$body
echo ::set-output name=log::${body:0:65000}
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
Expand All @@ -92,7 +92,7 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: This datastream diff is auto generated by the check
- name: Create or update comment
if: ${{ steps.compare_ds.outputs.COMPARE_DS_OUTPUT_SIZE != '0'}}
if: ${{ steps.compare_ds.outputs.COMPARE_DS_OUTPUT_SIZE != '0' && steps.compare_ds.outputs.COMPARE_DS_OUTPUT_SIZE <= 65000 }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand All @@ -106,6 +106,26 @@ jobs:
${{ steps.diff.outputs.log }}
```

</details>
edit-mode: replace
- name: Create or update a trimmed comment
if: ${{ steps.compare_ds.outputs.COMPARE_DS_OUTPUT_SIZE > 65000 }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
This datastream diff is auto generated by the check `Compare DS/Generate Diff`.
Due to the excessive size of the diff, it has been trimmed to fit the 65535-character limit.
<details>
<summary>Click here to see the trimmed diff</summary>

```diff
${{ steps.diff.outputs.log }}

... The diff is trimmed here ...
```

</details>
edit-mode: replace
- name: Delete existing comment in case new commits trigger no changes in Compare DS tool
Expand Down