Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

feat: support listing all branches#178

Merged
felix-seifert merged 1 commit into
spotify:masterfrom
msvticket:paginatebrancches
Feb 1, 2024
Merged

feat: support listing all branches#178
felix-seifert merged 1 commit into
spotify:masterfrom
msvticket:paginatebrancches

Conversation

@msvticket
Copy link
Copy Markdown
Contributor

Also added convenience method for making a stream of paginated results

* @return list of 30 branches in repository
* @deprecated Doesn't return all branches. Use {@link RepositoryClient#listAllBranches} instead
*/
@Deprecated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi and thank you for your contribution! I don't think we really need to deprecate this method?
Did a similar PR recently: #176 without deprecating the non paged method. Otherwise I think this PR looks good!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow I think developers should be warned to not use the old method and point them in a better direction. Depreciation was the clearest way I could think of for doing that. But I agree that depreciation is a bit wrong in the sense that the old method isn't likely to be removed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the public methods in this repo usually have javadocs, I think it might be nice to just mention the new (better) method in the javadocs without labelling the old method as deprecated..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good think with deprecation is that it gives a visible warning in peoples IDEs. But OK, how about this?

Also added convenience method for making a stream of paginated results
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 1, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (550c880) 77.23% compared to head (b9d9f14) 77.17%.

Files Patch % Lines
src/main/java/com/spotify/github/async/Async.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #178      +/-   ##
============================================
- Coverage     77.23%   77.17%   -0.07%     
- Complexity      308      311       +3     
============================================
  Files            43       44       +1     
  Lines          1028     1034       +6     
  Branches         44       44              
============================================
+ Hits            794      798       +4     
- Misses          209      211       +2     
  Partials         25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@felix-seifert felix-seifert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now sounds like a nice compromise to hint lib users to use the paged method instead!

@felix-seifert felix-seifert merged commit c6999fc into spotify:master Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants