[ci] Fix docs validation notification: use Jobs API instead of artifacts#18052
Merged
theletterf merged 1 commit intomainfrom Mar 25, 2026
Merged
[ci] Fix docs validation notification: use Jobs API instead of artifacts#18052theletterf merged 1 commit intomainfrom
theletterf merged 1 commit intomainfrom
Conversation
|
💚 CLA has been signed |
The artifact-based approach doesn't work because upload-artifact@v4 scopes artifacts to the workflow run, making them inaccessible from a workflow_run-triggered workflow via download-artifact. Instead, query the Jobs API to check if the "Validate with docs-builder" step concluded as failure (despite the job succeeding via continue-on-error), and find the PR number from the head SHA. Also removes the now-unnecessary signal/upload steps from the validation workflow. Handles jq returning literal "null" for commits without a PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9f99938 to
6e3653c
Compare
mrodm
approved these changes
Mar 25, 2026
theletterf
added a commit
that referenced
this pull request
Mar 25, 2026
…cts (#18052) The artifact-based notification couldn't detect failures because upload-artifact@v4 scopes artifacts to their workflow run. Instead, download the workflow logs via the API and grep for docs-builder's summary line (N Errors / N Warnings) to detect failures even with continue-on-error. Keeps validation workflow read-only (contents: read) and notification workflow separate (pull-requests: write via workflow_run, safe for forks). Permissions at job level per least-permissive approach. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the notification workflow that was failing to post comments because
download-artifact@v4can't access artifacts across workflow runs.Replaces #18050 (CLA failure due to bot commit in history).
What changed
notify-package-docs-failure.yml— replaced the artifact download with the Jobs API:GET /repos/{repo}/actions/runs/{id}/jobsto check if the "Validate with docs-builder" step concluded asfailurenulloutput)validate-package-docs.yml— removed the signal/upload artifact steps (no longer needed).Why the artifact approach failed
upload-artifact@v4scopes artifacts to the workflow run that created them.download-artifact@v4in aworkflow_run-triggered workflow can't access them, resulting inArtifact not found.🤖 Generated with Claude Code