Skip to content

feat: add option for custom path to summary comment output#388

Merged
2bndy5 merged 2 commits into
mainfrom
custom-summary-file
Jun 27, 2026
Merged

feat: add option for custom path to summary comment output#388
2bndy5 merged 2 commits into
mainfrom
custom-summary-file

Conversation

@2bndy5

@2bndy5 2bndy5 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

ref

Allows exporting the step summary comment to a custom file path.

Useful as a workaround for contexts with restricted permissions (eg private repos).

Summary by CodeRabbit

  • New Features

    • Added a new CLI option to save the generated summary to a file.
    • Summary files can use either an absolute path or a path relative to the repository root.
  • Bug Fixes

    • Summary content is now generated whenever file output is requested, even if step-based summary posting is off.
    • Improved error reporting for file and directory write failures.

ref
- cpp-linter/cpp-linter#205
- cpp-linter/cpp-linter#206

Allows exporting the step summary comment to a custom file path.

Useful as a workaround for contexts with restricted permissions (eg private repos).
@2bndy5 2bndy5 added the enhancement New feature or request label Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@2bndy5, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 39 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: b62c709d-2fd3-48b0-8cfc-9020369c80ba

📥 Commits

Reviewing files that changed from the base of the PR and between 7f186f4 and cdb85f0.

📒 Files selected for processing (1)
  • cpp-linter/src/rest_client.rs
📝 Walkthrough

Walkthrough

The PR adds a --summary-output-file CLI option, threads it through FeedbackInput, writes generated feedback summaries to an absolute or repo-root-relative path in post_feedback, and updates comment tests plus CLI documentation.

Changes

Summary output file support

Layer / File(s) Summary
CLI contract and docs
cpp-linter/src/cli/mod.rs, cpp-linter/src/cli/structs.rs, docs/cli.yml
Adds summary_output_file to FeedbackOptions and FeedbackInput, initializes it to None, and updates the documented CLI inputs.
Summary file write flow
cpp-linter/src/common_fs.rs, cpp-linter/src/error.rs, cpp-linter/src/rest_client.rs
post_feedback generates the summary for file output, resolves relative paths against repo_root, creates parent directories, writes the file, reports filesystem failures through structured client errors, and mk_path_abs is compiled only for tests or the bin feature.
Comment test coverage
cpp-linter/tests/comments.rs
The comment tests pass --summary-output-file, cover absolute and relative output paths, and assert the written summary contains COMMENT_MARKER and USER_OUTREACH.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a custom path option for summary comment output.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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.

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.86957% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.26%. Comparing base (7ad731f) to head (cdb85f0).

Files with missing lines Patch % Lines
cpp-linter/src/rest_client.rs 57.14% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
- Coverage   92.59%   92.26%   -0.34%     
==========================================
  Files          23       23              
  Lines        3729     3750      +21     
==========================================
+ Hits         3453     3460       +7     
- Misses        276      290      +14     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2bndy5 2bndy5 marked this pull request as ready for review June 27, 2026 02:54
coderabbitai[bot]

This comment was marked as resolved.

@2bndy5 2bndy5 merged commit 4958912 into main Jun 27, 2026
73 checks passed
@2bndy5 2bndy5 deleted the custom-summary-file branch June 27, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant