improved prepare report

This commit is contained in:
rahulpinto19
2026-02-17 10:01:26 +00:00
parent bed9c66113
commit d22851388b

View File

@@ -90,20 +90,19 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: "## Link Resolution Note"
# - name: Delete comment on success
# if: steps.lychee-check.outcome == 'success' && steps.find-comment.outputs.comment-id != ''
# uses: detomarco/delete-comment@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# repository: ${{ github.repository }}
# comment-id: ${{ steps.find-comment.outputs.comment-id }}
- name: Delete comment on success
if: steps.lychee-check.outcome == 'success' && steps.find-comment.outputs.comment-id != ''
uses: detomarco/delete-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
- name: Prepare Report
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
run: |
# Create a new file 'full-report.md'
echo "## Link Resolution Note" > full-report.md
echo "<small>" >> full-report.md
echo "Local links and directory changes work differently on GitHub than on the docsite." >> full-report.md
echo "You must ensure fixes pass the **GitHub check** and also work with **\`hugo server\`**." >> full-report.md
@@ -111,12 +110,13 @@ jobs:
echo "</small>" >> full-report.md
echo "---" >> full-report.md
echo "### Broken Links Found" >> full-report.md
echo "<small>" >> full-report.md
echo "" >> full-report.md
sed -E '/(Redirect|Redirects per input)/d' lychee-report.md >> full-report.md
echo "</small>" >> full-report.md
- name: Create PR Comment
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'