Skip to content

Commit 8958748

Browse files
zaniebzaniebot
andauthored
[ty] Publish ecosystem reports from GitHub Actions (astral-sh#29609)
ty ecosystem report comments currently depend on `astral-sh-bot`. Publish the summary as `astral-automations-bot[bot]` using the shared STS publisher and comment IDs from the key-value store. Include a link to the downloadable HTML reports artifact when it is available. This handles same-repository pull requests and depends on astral-sh#29608. --------- Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
1 parent 01f5394 commit 8958748

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

‎.github/workflows/ty-ecosystem-analyzer.yaml‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,12 @@ jobs:
304304
305305
echo "diff_statistics_exit_code=$DIFF_STATISTICS_EXIT_CODE" >> "$GITHUB_OUTPUT"
306306
307-
# NOTE: astral-bot deploys every file in this artifact and uses the
308-
# deployed HTML URLs for the report links in its PR comment.
309-
# Make sure to update the bot if you rename the artifact.
310307
- name: "Upload full report"
311308
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
312309
with:
313310
name: full-report
314311
path: dist/
315312

316-
# NOTE: astral-sh-bot uses this artifact to post comments on PRs.
317-
# Make sure to update the bot if you rename the artifact.
318313
- name: Upload comment
319314
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
320315
with:
@@ -324,3 +319,23 @@ jobs:
324319
- name: Fail on new abnormal exits
325320
if: steps.generate-reports.outputs.diff_statistics_exit_code != '0'
326321
run: exit 1
322+
323+
publish-report:
324+
needs: generate-report
325+
if: >-
326+
!cancelled() && github.event_name == 'pull_request' &&
327+
github.repository == 'astral-sh/ruff' &&
328+
github.event.pull_request.head.repo.full_name == github.repository &&
329+
(needs.generate-report.result == 'success' || needs.generate-report.result == 'failure')
330+
uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@main # zizmor: ignore[unpinned-uses]
331+
secrets:
332+
KV_API_URL: ${{ secrets.KV_API_URL }}
333+
STS_API_URL: ${{ secrets.STS_API_URL }}
334+
permissions:
335+
contents: read
336+
id-token: write
337+
with:
338+
report: ty-ecosystem
339+
artifact: comment.md
340+
filename: comment.md
341+
full-report-artifact: full-report

0 commit comments

Comments
 (0)