fix: fix the logic of finding artifacts#18
Conversation
Rsdoctor Bundle Diff AnalysisFound 2 project(s) in monorepo. 📁 rsbuild-demoPath:
📦 Download Diff Report: rsbuild-demo Bundle Diff 📁 rsbuild-demo2Path:
📦 Download Diff Report: rsbuild-demo2 Bundle Diff Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
Pull request overview
This PR optimizes the artifact finding logic by introducing a more efficient workflow run-based approach that reduces GitHub API calls and improves performance.
Key changes:
- Added two new methods in
GitHubServiceto find workflow runs by commit hash and list artifacts for specific workflow runs - Updated
downloadArtifactByCommitHashto try finding artifacts via workflow runs first, with fallback to listing all repository artifacts - Simplified artifact details display logic by removing redundant API call
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/github.ts | Added findWorkflowRunByCommit and listArtifactsForWorkflowRun methods to optimize artifact retrieval |
| src/download.ts | Refactored artifact finding to use workflow run lookup first with fallback, simplified artifact details display |
| package.json | Reordered dependencies alphabetically |
| dist/index.js | Compiled output reflecting the source code changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.