Skip to content

Fix deprecated api warning - #371

Merged
Codex- merged 4 commits into
mainfrom
fix_deprecated_api_warning
Aug 12, 2026
Merged

Fix deprecated api warning#371
Codex- merged 4 commits into
mainfrom
fix_deprecated_api_warning

Conversation

@Codex-

@Codex- Codex- commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Fixes #349

Summary by CodeRabbit

  • Documentation

    • Updated GitHub API guidance to use the pinned API version request header for retrieving workflow run details.
  • Bug Fixes

    • Improved workflow dispatch compatibility by replacing the deprecated request option with the supported API version header.
    • Enhanced error handling for servers that do not support the required API version.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Codex-, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c39e740-c708-4824-b1b6-9362a90a68ad

📥 Commits

Reviewing files that changed from the base of the PR and between 539c08b and 0702fd4.

⛔ Files ignored due to path filters (2)
  • dist/index.mjs is excluded by !**/dist/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • src/api.spec.ts
📝 Walkthrough

Walkthrough

The workflow dispatch API now sends X-GitHub-Api-Version: 2026-03-10 instead of return_run_details. API documentation, README guidance, and tests now reflect version-dependent run details and unsupported-version responses.

Changes

API version dispatch

Layer / File(s) Summary
Dispatch header and API contract
src/api.ts
The dispatch request sends the pinned API version header. API documentation describes the version-dependent response and unsupported-server handling.
Dispatch validation and usage documentation
src/api.spec.ts, README.md
Tests validate the header and ignored or rejected API versions. The README documents the new header.、

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 539c0

The PR updates the API version and removes the deprecated dispatch parameter, with the generated bundle reflecting the change. No actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% 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 clearly identifies the main change: fixing the deprecated API warning.
Linked Issues check ✅ Passed The implementation replaces the deprecated dispatch parameter with the pinned API version header and updates tests and documentation.
Out of Scope Changes check ✅ Passed The implementation, tests, and documentation changes directly support the linked deprecation issue.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_deprecated_api_warning

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-commenter

codecov-commenter commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.46%. Comparing base (aae7fff) to head (0702fd4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #371      +/-   ##
==========================================
+ Coverage   88.31%   88.46%   +0.14%     
==========================================
  Files           3        3              
  Lines          77       78       +1     
  Branches       21       21              
==========================================
+ Hits           68       69       +1     
  Misses          2        2              
  Partials        7        7              

☔ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@src/api.spec.ts`:
- Around line 103-106: Update the dispatch-parameter assertions in the test
around the pinned API version to explicitly verify that return_run_details is
absent, while retaining the existing x-github-api-version header assertion.
Ensure the test checks the actual top-level dispatch parameters rather than
relying only on header equality.
🪄 Autofix

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d4818f8-be2d-40f5-8098-40ef4609c1df

📥 Commits

Reviewing files that changed from the base of the PR and between aae7fff and 539c08b.

⛔ Files ignored due to path filters (1)
  • dist/index.mjs is excluded by !**/dist/**
📒 Files selected for processing (3)
  • README.md
  • src/api.spec.ts
  • src/api.ts

Comment thread src/api.spec.ts Outdated
@Codex-
Codex- force-pushed the fix_deprecated_api_warning branch from 539c08b to 0702fd4 Compare August 12, 2026 22:37
@Codex-
Codex- merged commit b275e07 into main Aug 12, 2026
7 checks passed
@Codex-
Codex- deleted the fix_deprecated_api_warning branch August 12, 2026 22:58
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.

"POST https://api.github.com/repos/org/my-repo/actions/workflows/my-workflow.yml/dispatches" is deprecated

2 participants