Skip to content

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

@bitwiseman

Description

@bitwiseman

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions