Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/59d512e7-d814-41cc-8eb5-90f3694512d2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Pass skipArchive option to @actions/artifact client.uploadArtifact() when skip-archive is enabled in workflow config - Construct artifact URL from upload result ID and GitHub context env vars (GITHUB_SERVER_URL, GITHUB_REPOSITORY, GITHUB_RUN_ID) - Output slot_N_artifact_id and slot_N_artifact_url step outputs - Return artifactId and artifactUrl in handler result - Add upload-artifact safe-output with skip-archive:true to python-dataviz shared workflow for chart image uploads - Update safe-output-upload-artifact.md with artifact URL rendering docs - Add tests for skipArchive passthrough, artifact URL construction, and staged mode behavior Agent-Logs-Url: https://github.com/github/gh-aw/sessions/59d512e7-d814-41cc-8eb5-90f3694512d2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR enables image-friendly artifact uploads by wiring the previously-parsed skip-archive configuration through to @actions/artifact, and exposing per-upload artifact IDs/URLs for use in generated markdown.
Changes:
- Passes
skipArchive: trueto@actions/artifactwhenskip-archiveis enabled, and surfacesartifactId/artifactUrlin handler results and step outputs. - Adds unit tests covering
skipArchiveoption behavior, artifact URL construction, and staged mode output suppression. - Updates shared docs and multiple compiled workflow lockfiles to support
upload_artifactstaging + mounting.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/upload_artifact.cjs | Implements skipArchive upload option and emits artifact ID/URL outputs. |
| actions/setup/js/upload_artifact.test.cjs | Adds tests for skipArchive option passing and artifact URL output behavior. |
| .github/workflows/shared/safe-output-upload-artifact.md | Documents artifact URL usage for rendering images in markdown. |
| .github/workflows/shared/python-dataviz.md | Adds upload-artifact safe-output config and updated guidance for embedding images. |
| .github/workflows/weekly-issue-summary.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/stale-repo-identifier.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/python-data-charts.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/org-health-report.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/daily-repo-chronicle.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/daily-news.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/daily-issues-report.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/daily-integrity-analysis.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/daily-code-metrics.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/copilot-token-audit.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/copilot-session-insights.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Adds upload_artifact safe-output config and staging artifact plumbing. |
| .github/workflows/agentics-maintenance.yml | Changes validate_workflows runner from ubuntu-slim to ubuntu-latest. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 18/18 changed files
- Comments generated: 3
| const repository = process.env.GITHUB_REPOSITORY || ""; | ||
| const runId = process.env.GITHUB_RUN_ID || ""; | ||
| if (repository && runId) { | ||
| artifactUrl = `${serverUrl}/${repository}/actions/runs/${runId}/artifacts/${artifactId}`; |
There was a problem hiding this comment.
Artifact URL construction uses string concatenation with GITHUB_SERVER_URL and can produce a malformed URL with a double // if GITHUB_SERVER_URL ends with a trailing slash (this repo already normalizes it elsewhere, e.g. actions/setup/js/git_helpers.cjs:30). Consider normalizing serverUrl (trim trailing /) or using new URL() to build the URL safely.
| artifactUrl = `${serverUrl}/${repository}/actions/runs/${runId}/artifacts/${artifactId}`; | |
| artifactUrl = new URL(`/${repository}/actions/runs/${runId}/artifacts/${artifactId}`, serverUrl).toString(); |
| The tool returns a temporary opaque artifact ID (`aw_*`) that can be resolved to | ||
| a download URL by an authorised downstream step. | ||
| a download URL by an authorised downstream step. When `skip-archive` is enabled, the | ||
| tool also outputs `slot_N_artifact_url` containing a direct link to the uploaded artifact, | ||
| which can be used to render images inline in markdown. |
There was a problem hiding this comment.
This doc says slot_N_artifact_url is only output when skip-archive is enabled, but the handler currently emits slot_N_artifact_url whenever it can construct one (independent of skip-archive). Please either update the documentation to match the implementation, or gate the output/URL construction behind skip-archive: true if that’s the intended behavior.
| validate_workflows: | ||
| if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.operation == 'validate' && !github.event.repository.fork }} | ||
| runs-on: ubuntu-slim | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
validate_workflows switches from runs-on: ubuntu-slim to ubuntu-latest while the rest of this workflow (and most workflows in the repo) still use ubuntu-slim. If ubuntu-slim is a deliberate runner label (custom image) this change could alter tool availability/costs and looks unrelated to the PR’s stated goal. Please confirm this is intentional and, if so, document the rationale in the PR description (or keep the runner consistent).
🧪 Test Quality Sentinel ReportTest Quality Score: 78/100
Test Classification DetailsAll 5 tests (click to expand)
Test Inflation Warning
This is a minor breach and the tests are high-quality, so no action is required — just worth noting. Suggestions (non-blocking)
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 78/100. Test quality is acceptable — 0% of new tests are implementation tests (threshold: 30%). All 5 new tests verify behavioral contracts for the skipArchive option forwarding and artifact URL output feature. Minor test inflation noted (2.13:1) but non-blocking.
|
@copilot Review all comments |
…n, fix docs, revert unrelated runner change - Use new URL() instead of string concatenation to avoid double-slash when GITHUB_SERVER_URL has trailing slash - Update safe-output-upload-artifact.md docs to clarify artifact URL is output on all successful uploads (not only when skip-archive is enabled) - Revert unrelated ubuntu-slim → ubuntu-latest change in agentics-maintenance.yml Agent-Logs-Url: https://github.com/github/gh-aw/sessions/753ddb30-9510-467d-b5ee-446cd3b5065b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed all three review comments in f40dcf9:
|
Summary
Pass
skipArchiveoption to@actions/artifactclient and expose artifact URL outputs. This enables workflows to upload images without zip archiving and use the resulting artifact URLs to render images inline in generated markdown (issues, PR comments, discussions, step summaries).Changes
actions/setup/js/upload_artifact.cjsskipArchive: truetoclient.uploadArtifact()options whenskip-archiveis enabled in workflow config (previously parsed but never used)GITHUB_SERVER_URL,GITHUB_REPOSITORY,GITHUB_RUN_ID)slot_N_artifact_idandslot_N_artifact_urlstep outputs for downstream consumptionartifactIdandartifactUrlin the handler result objectactions/setup/js/upload_artifact.test.cjsskipArchiveoption is passed to artifact client when enabledskipArchiveis not passed when disabled.github/workflows/shared/python-dataviz.mdupload-artifactsafe-output config withskip-archive: true,max-uploads: 5, and allowed image paths (*.png,*.jpg,*.svg)upload_artifacttool withskip-archive: trueupload assetapproach.github/workflows/shared/safe-output-upload-artifact.mdHow artifact image rendering works
skip-archive: trueinsafe-outputs.upload-artifactupload_artifacttool with the image path@actions/artifactwithskipArchive: true(no zip)slot_N_artifact_urland can be used in markdown:Testing