Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Extract pull request conversion logic - #245

Closed
danbi2990 wants to merge 1 commit into
mainfrom
jake/refactor-pr-conversion
Closed

Extract pull request conversion logic#245
danbi2990 wants to merge 1 commit into
mainfrom
jake/refactor-pr-conversion

Conversation

@danbi2990

Copy link
Copy Markdown
Contributor

Closes #237

@codecov

codecov Bot commented Sep 10, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.76923% with 129 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.69%. Comparing base (c7ad10c) to head (312d86d).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/database/pull_request.rs 0.00% 114 Missing ⚠️
src/outbound.rs 0.00% 14 Missing ⚠️
src/api/pull_request.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   34.42%   40.69%   +6.27%     
==========================================
  Files          17       17              
  Lines        1008     1118     +110     
==========================================
+ Hits          347      455     +108     
- Misses        661      663       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marioCluml marioCluml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For src/database/pull_request.rs, it may be more intuitive to just import the paths in the use declaration block instead of using the path itself. What do you think? Same thing with src/outbound.rs, where tracing::warn! and tracing::debug! is used but tracing::error is declared in the use declaration block. I think it's minor but would be good in terms of consistency.

e.g. pull_requests::PullRequestsRepositoryPullRequestNodesAuthor vs on the top just adding it to use crate::outbound::pull_requests::{}

Comment thread src/database/pull_request.rs Outdated
Comment on lines +269 to +279
// Labels and assignees
let labels = pr.labels.map(Vec::<String>::from).unwrap_or_default();
let assignees = Vec::<String>::from(pr.assignees);
let review_requests = pr
.review_requests
.map(Vec::<String>::from)
.unwrap_or_default();

// Comments require repository name context
let comments_total: i32 = pr.comments.total_count.try_into()?;
let repo_owner = pr.repository.owner.login.clone();
let repo_name = pr.repository.name.clone();
let comments_nodes = pr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For this, are the comments necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the comments.

@danbi2990
danbi2990 force-pushed the jake/refactor-pr-conversion branch from 8f29507 to 312d86d Compare September 18, 2025 08:53
@danbi2990

Copy link
Copy Markdown
Contributor Author

e.g. pull_requests::PullRequestsRepositoryPullRequestNodesAuthor vs on the top just adding it to use crate::outbound::pull_requests::{}

Applied the suggested adjustment.

@sophie-cluml

Copy link
Copy Markdown

github-dashboard 진행을 stop 하므로, 리팩토링 목적의 이 PR은 리뷰/머지를 진행하는 것보다 정리하는 것이 효율적이라고 판단되어 닫습니다.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement (Try)From for pull request structs

3 participants