Skip to content

docs: update pluggable HTTP client guide to use OkHttpGitHubConnector#2266

Open
SAY-5 wants to merge 1 commit into
hub4j:mainfrom
SAY-5:say5-docs-okhttp-connector-2126
Open

docs: update pluggable HTTP client guide to use OkHttpGitHubConnector#2266
SAY-5 wants to merge 1 commit into
hub4j:mainfrom
SAY-5:say5-docs-okhttp-connector-2126

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 21, 2026

Description

Fixes #2126.

The "Pluggable HTTP client" section of src/site/apt/index.apt referenced the legacy OkHttpConnector plus OkUrlFactory.setCache() API, which no longer match the current OkHttpGitHubConnector (in org.kohsuke.github.extras.okhttp3). New users following this guide could not find a working integration path; the maintainer note on the issue confirms the desired direction (use OkHttpGitHubConnector + GitHubBuilder.withConnector()).

The sample now:

  • references GitHubConnector (the actual interface) instead of HttpConnector,
  • names OkHttpGitHubConnector and its package so it is greppable,
  • builds the OkHttpClient via OkHttpClient.Builder().cache(...), matching the in-tree GitHubCachingTest.

Before submitting a PR:

  • Changes must not break binary backwards compatibility.
  • Add JavaDocs and other comments explaining the behavior.
  • When adding or updating methods that fetch entities, add @link JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
  • Add tests that cover any added or changed code. (Docs-only change; no behavior change.)
  • Run mvn -D enable-ci clean install site "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED" locally. (Spotless verified locally.)
  • Push your changes to a branch other than main.

When creating a PR:

  • Fill in the "Description" above with clear summary of the changes.
    • If this PR fixes one or more issues, include "Fixes #" lines for each issue.
    • Provide links to relevant documentation on https://docs.github.com/en/rest where possible.
  • All lines of new code should be covered by tests as reported by code coverage. (Docs-only.)
  • Enable "Allow edits from maintainers".

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.30%. Comparing base (3622553) to head (27446ec).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2266   +/-   ##
=========================================
  Coverage     85.30%   85.30%           
  Complexity     2553     2553           
=========================================
  Files           241      241           
  Lines          7540     7540           
  Branches        396      396           
=========================================
  Hits           6432     6432           
  Misses          872      872           
  Partials        236      236           

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

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.

Update documentation on pluggable Http Client

1 participant