Skip to content

Commit 01f5394

Browse files
zaniebzaniebot
andauthored
[ty] Publish typing conformance reports from GitHub Actions (astral-sh#29608)
Typing conformance report comments currently depend on `astral-sh-bot`. Publish the diagnostics diff as `astral-automations-bot[bot]` after the conformance job, using the shared STS publisher and comment IDs from the key-value store for same-repository pull requests. Depends on astral-sh#29607. --------- Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
1 parent 04ccf6c commit 01f5394

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

‎.github/workflows/typing_conformance.yaml‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,27 @@ jobs:
118118
--output ../typing_conformance_diagnostics.diff
119119
)
120120
121-
# NOTE: astral-sh-bot uses this artifact to post comments on PRs.
122-
# Make sure to update the bot if you rename the artifact.
123121
- name: Upload diff
124122
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125123
with:
126124
name: typing_conformance_diagnostics_diff
127125
path: typing_conformance_diagnostics.diff
126+
127+
publish-report:
128+
needs: typing_conformance
129+
if: >-
130+
!cancelled() && github.event_name == 'pull_request' &&
131+
github.repository == 'astral-sh/ruff' &&
132+
github.event.pull_request.head.repo.full_name == github.repository &&
133+
(needs.typing_conformance.result == 'success' || needs.typing_conformance.result == 'failure')
134+
uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@main # zizmor: ignore[unpinned-uses]
135+
secrets:
136+
KV_API_URL: ${{ secrets.KV_API_URL }}
137+
STS_API_URL: ${{ secrets.STS_API_URL }}
138+
permissions:
139+
contents: read
140+
id-token: write
141+
with:
142+
report: typing-conformance
143+
artifact: typing_conformance_diagnostics_diff
144+
filename: typing_conformance_diagnostics.diff

0 commit comments

Comments
 (0)