Skip to content

Add more info to the get_pr command#267

Open
kdeal wants to merge 1 commit into
mainfrom
push-wozspmpuswmn
Open

Add more info to the get_pr command#267
kdeal wants to merge 1 commit into
mainfrom
push-wozspmpuswmn

Conversation

@kdeal

@kdeal kdeal commented Jun 28, 2026

Copy link
Copy Markdown
Owner

This adds the full list of status checks and the body of the reviews.

Summary by CodeRabbit

  • New Features

    • PR details now show richer GitHub status and check information, including additional context details and links when available.
    • Review entries now display the review comment body along with author, state, and submission time.
    • Status checks can now load more results, improving visibility for PRs with many checks.
  • Bug Fixes

    • Improved formatting of PR reviews and status sections for easier scanning.

This adds the full list of status checks and the body of the reviews.
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR extends the GitHub PR details pipeline end-to-end. A new PrDetailsStatusChecks GraphQL query is introduced for paginated status-check context fetching, and the existing PrDetails/PrDetailsReviews queries are updated to add statusCheckCursor, body, detailsUrl, description, targetUrl, and pageInfo fields. Corresponding Rust deserialization structs gain new typed fields. The GitHub client gains a get_pull_request_status_checks_page helper and a pagination loop, and JSON serialization now includes contexts, status_contexts, details_url, and body. The markdown output is updated to render the new fields in the Latest Status, Latest Checks, and Reviews sections.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • kdeal/misc#261: Modifies the same get_pull_request_details fetch and markdown rendering path in actions.rs and github.rs.

Suggested labels

codex

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: it updates get_pr to show more PR details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch push-wozspmpuswmn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kdeal

kdeal commented Jun 28, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wkfl/src/github.rs`:
- Around line 795-818: The status-check paging path in
get_pull_request_status_checks_page drops the fetched commit OID, which can
cause later pages to be merged into the wrong commit’s rollup. Update
GraphQLPrStatusChecksPage and the page handling in get_pull_request_details to
return and compare the commit OID from the paged commits(last: 1) result against
the original status_commit.oid before appending any additional contexts. If the
OIDs differ, stop merging and treat the page as belonging to a different head
commit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f1ddf8c-b4da-466b-a486-a0062b2ace20

📥 Commits

Reviewing files that changed from the base of the PR and between 94c8617 and a1c9efe.

📒 Files selected for processing (6)
  • wkfl/src/actions.rs
  • wkfl/src/github.rs
  • wkfl/src/gql_queries/pr_details.graphql
  • wkfl/src/gql_queries/pr_details.rs
  • wkfl/src/gql_queries/pr_details_reviews.graphql
  • wkfl/src/gql_queries/pr_details_status_checks.graphql

Comment thread wkfl/src/github.rs
Comment on lines +795 to +818
fn get_pull_request_status_checks_page(
&self,
owner: &str,
repo: &str,
pr_number: u64,
cursor: &str,
) -> Result<Option<crate::gql_queries::pr_details::GraphQLCheckRunConnection>> {
let variables = pr_connection_variables(owner, repo, pr_number, cursor);
let data: GraphQLPrConnectionPageData<GraphQLPrStatusChecksPage> = self
.graphql_query(gql_queries::pr_details::STATUS_CHECKS_QUERY, &variables)
.with_context(|| {
format!("Failed to query GitHub GraphQL API for PR #{pr_number} status checks")
})?;

let page = pull_request_connection_page(data, owner, repo, pr_number, "status checks")?;
Ok(page
.commits_for_status
.nodes
.into_iter()
.flatten()
.next()
.and_then(|node| node.commit.status_check_rollup)
.map(|rollup| rollup.contexts))
}

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.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Preserve the paged commit OID before appending more contexts.

This helper re-runs a query that still resolves commits(last: 1), then throws away the returned oid. If a push lands between page fetches, get_pull_request_details will append contexts from the new head into the old head’s rollup. Return the fetched commit OID with the page and compare it against the initial status_commit.oid before extending.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wkfl/src/github.rs` around lines 795 - 818, The status-check paging path in
get_pull_request_status_checks_page drops the fetched commit OID, which can
cause later pages to be merged into the wrong commit’s rollup. Update
GraphQLPrStatusChecksPage and the page handling in get_pull_request_details to
return and compare the commit OID from the paged commits(last: 1) result against
the original status_commit.oid before appending any additional contexts. If the
OIDs differ, stop merging and treat the page as belonging to a different head
commit.

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.

1 participant