mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:43 +00:00
Truncate ecosystem comment when necessary (#6899)
This commit is contained in:
parent
fa25dabf17
commit
30ebf7fc86
1 changed files with 23 additions and 12 deletions
35
.github/workflows/pr-comment.yaml
vendored
35
.github/workflows/pr-comment.yaml
vendored
|
@ -47,19 +47,30 @@ jobs:
|
||||||
id: generate-comment
|
id: generate-comment
|
||||||
if: steps.download-ecosystem-result.outputs.found_artifact == 'true'
|
if: steps.download-ecosystem-result.outputs.found_artifact == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
echo '## PR Check Results' >> comment.txt
|
||||||
|
|
||||||
|
echo "### Ecosystem" >> comment.txt
|
||||||
|
cat pr/ecosystem/ecosystem-result >> comment.txt
|
||||||
|
echo "" >> comment.txt
|
||||||
|
|
||||||
echo 'comment<<EOF' >> $GITHUB_OUTPUT
|
echo 'comment<<EOF' >> $GITHUB_OUTPUT
|
||||||
echo '## PR Check Results' >> $GITHUB_OUTPUT
|
cat comment.txt >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
echo "### Ecosystem" >> $GITHUB_OUTPUT
|
|
||||||
cat pr/ecosystem/ecosystem-result >> $GITHUB_OUTPUT
|
|
||||||
echo "" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
echo 'EOF' >> $GITHUB_OUTPUT
|
echo 'EOF' >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create or update comment
|
- name: Find Comment
|
||||||
if: steps.generate-comment.outputs.comment
|
uses: peter-evans/find-comment@v2
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
if: steps.generate-comment.outcome == 'success'
|
||||||
|
id: find-comment
|
||||||
with:
|
with:
|
||||||
pr_number: ${{ steps.pr-number.outputs.pr-number }}
|
issue-number: ${{ steps.pr-number.outputs.pr-number }}
|
||||||
message: ${{ steps.generate-comment.outputs.comment }}
|
comment-author: "github-actions[bot]"
|
||||||
comment_tag: PR Check Results
|
body-includes: PR Check Results
|
||||||
|
|
||||||
|
- name: Create or update comment
|
||||||
|
if: steps.find-comment.outcome == 'success'
|
||||||
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
|
with:
|
||||||
|
comment-id: ${{ steps.find-comment.outputs.comment-id }}
|
||||||
|
issue-number: ${{ steps.pr-number.outputs.pr-number }}
|
||||||
|
body-path: comment.txt
|
||||||
|
edit-mode: replace
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue