mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-18 11:02:26 -05:00
ordered correct
This commit is contained in:
20
.github/workflows/link_checker_workflow.yaml
vendored
20
.github/workflows/link_checker_workflow.yaml
vendored
@@ -80,7 +80,6 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Find comment
|
||||
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
|
||||
uses: peter-evans/find-comment@v3
|
||||
id: find-comment
|
||||
with:
|
||||
@@ -88,6 +87,16 @@ 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 != ''
|
||||
run: |
|
||||
gh api \
|
||||
--method DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
/repos/${{ github.repository }}/issues/comments/${{ steps.find-comment.outputs.comment-id }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Prepare Report
|
||||
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
|
||||
run: |
|
||||
@@ -102,15 +111,6 @@ jobs:
|
||||
# Clean the report (remove redirects) AND append it to the file
|
||||
sed -E '/(Redirect|Redirects per input)/d' lychee-report.md >> full-report.md
|
||||
|
||||
- name: Delete comment on success
|
||||
if: steps.lychee-check.outcome == 'success' && steps.find-comment.outputs.comment-id != ''
|
||||
run: |
|
||||
gh api \
|
||||
--method DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
/repos/${{ github.repository }}/issues/comments/${{ steps.find-comment.outputs.comment-id }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create PR Comment
|
||||
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
|
||||
|
||||
Reference in New Issue
Block a user