Skip to content

Implement interfaces from GithubApi for all public classes#2196

Closed
codexcoder21 wants to merge 1 commit intohub4j:mainfrom
codexcoder21:feature/implement-interfaces
Closed

Implement interfaces from GithubApi for all public classes#2196
codexcoder21 wants to merge 1 commit intohub4j:mainfrom
codexcoder21:feature/implement-interfaces

Conversation

@codexcoder21
Copy link

Summary

  • ~150 public classes now implement their corresponding interfaces from community.kotlin.conrib.github, extracted into the separate GithubApi project. Each class (e.g. GHApp, GHRepository, GHPullRequest) now has an implements community.kotlin.conrib.github.<ClassName> clause, enabling consumers to program against stable interfaces rather than concrete implementations.

  • Enums, exceptions, and existing interfaces removed from org.kohsuke.github — these types (e.g. GHEvent, GHCommitState, GHDirection, GHException, HttpException, Reactable, Refreshable, TrafficInfo, and ~20 others) now live in the GithubApi project and are imported from community.kotlin.conrib.github.

  • Added community.kotlin.conrib:github-api:1.0.0-SNAPSHOT as a Maven dependency in pom.xml to provide the interface definitions, enums, and exceptions.

  • Updated all test files to import enums, exceptions, and interfaces from the new community.kotlin.conrib.github package.

Files changed

  • 230 files changed: 576 insertions, 1,690 deletions
  • ~150 Java classes modified to add implements clauses and new imports
  • 32 files deleted (enums, exceptions, interfaces that moved to GithubApi)
  • ~30 test files updated with new import paths
  • pom.xml updated with GithubApi dependency

Test plan

  • All 537 existing tests pass with the interface implementations
  • Verify Maven can resolve the community.kotlin.conrib:github-api:1.0.0-SNAPSHOT dependency
  • Verify no runtime class loading issues from the package restructuring
  • Confirm deleted enum/exception/interface types are correctly resolved from the GithubApi dependency

🤖 Generated with Claude Code

Each public class in org.kohsuke.github now implements its corresponding
interface from community.kotlin.conrib.github, extracted into the GithubApi
project. This enables programming against stable interfaces rather than
concrete implementations.

Key changes:
- ~150 classes now implement their extracted interfaces (e.g. GHApp
  implements community.kotlin.conrib.github.GHApp)
- Enums (GHEvent, GHCommitState, GHDirection, etc.), exceptions
  (GHException, GHIOException, HttpException, etc.), and existing
  interfaces (Reactable, Refreshable, TrafficInfo, etc.) have been
  removed from this project as they now live in GithubApi
- Added community.kotlin.conrib:github-api:1.0.0-SNAPSHOT as a Maven
  dependency in pom.xml
- Updated all test files to import enums, exceptions, and interfaces
  from the new community.kotlin.conrib.github package
- All 537 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codexcoder21
Copy link
Author

Closing - PR was created against the wrong repository by mistake.

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.

2 participants