mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-18 11:02:26 -05:00
improved prepare report
This commit is contained in:
20
.github/workflows/link_checker_workflow.yaml
vendored
20
.github/workflows/link_checker_workflow.yaml
vendored
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user