Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHRepository.getPullRequests(GHIssueState) not deprecated but removed from 2.x #1957

Open
bitwiseman opened this issue Sep 27, 2024 · 1 comment

Comments

@bitwiseman
Copy link
Member

https://github.com/hub4j/github-api/pull/1935/files#r1778850947 - Anchor

@ihrigb
Noted that GHRepository.getPullRequests(GHIssueState) was not marked as Deprecated but was removed in 2.0-alpha-1.

Did a search on usages:
https://github.com/search?q=org%3Ajenkinsci+getPullRequests+path%3A%2F%5Esrc%5C%2Fmain%5C%2Fjava%5C%2F%2F+org.kohsuke.github&type=code

It looks like there's at least one usage in the wild, and since it is in Jenkins it will cause breaks for some time to come.
https://github.com/jenkinsci/ghprb-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ghprb/GhprbRepository.java#L145

There's a similar one for listPullRequests().

Options:

  • Bring some methods back as bridge methods in 2.0 to not break Jenkins plugins.
  • Change to 1.x that converts methods removed in 2.x to bridge methods - this would force projects to change their code in their next release while maintaining binary compatibility. Maybe only convert some methods. This might be a way to push some additional changes into 2.x.

On the other hand this is a 2.0 release, some incompatibility is to be expected.

@ihrigb
Copy link
Contributor

ihrigb commented Sep 27, 2024

As this is a major release, I would indeed be fine with the change, even if it is breaking.
For almost all cases the fix would be very simple anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants