Skip to content

fix: fix the logic of finding artifacts#18

Merged
yifancong merged 4 commits intomainfrom
fix/optimize-find-artifacts
Dec 10, 2025
Merged

fix: fix the logic of finding artifacts#18
yifancong merged 4 commits intomainfrom
fix/optimize-find-artifacts

Conversation

@yifancong
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 10, 2025 06:25
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 10, 2025

Rsdoctor Bundle Diff Analysis

Found 2 project(s) in monorepo.

📁 rsbuild-demo

Path: examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json

📌 Baseline Commit: a92db9e3ee | PR: #17

Metric Current Baseline Change
📊 Total Size 190.4 KB 190.4 KB 0 B (0.0%)
📄 JavaScript 188.5 KB 188.5 KB 0 B (0.0%)
🎨 CSS 345.0 B 345.0 B 0 B (0.0%)
🌐 HTML 374.0 B 374.0 B 0 B (0.0%)
📁 Other Assets 1.2 KB 1.2 KB 0 B (0.0%)

📦 Download Diff Report: rsbuild-demo Bundle Diff

📁 rsbuild-demo2

Path: examples/rsbuild-demo2/dist/.rsdoctor/rsdoctor-data.json

📌 Baseline Commit: a92db9e3ee | PR: #17

Metric Current Baseline Change
📊 Total Size 190.7 KB 190.7 KB 0 B (0.0%)
📄 JavaScript 188.8 KB 188.8 KB 0 B (0.0%)
🎨 CSS 345.0 B 345.0 B 0 B (0.0%)
🌐 HTML 374.0 B 374.0 B 0 B (0.0%)
📁 Other Assets 1.2 KB 1.2 KB 0 B (0.0%)

📦 Download Diff Report: rsbuild-demo2 Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GitHubService to find workflow runs by commit hash and list artifacts for specific workflow runs
  • Updated downloadArtifactByCommitHash to 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.

Comment thread src/github.ts
Comment thread src/download.ts
Comment thread src/github.ts
Comment thread src/github.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants