fix!: Add `ListLicensesOptions` to `LicensesService.List` by alexandear · Pull Request #3981 · google/go-github

@alexandear

BREAKING CHANGE: LicensesService.List now accepts ListLicensesOptions parameter for pagination.


  1. Add missing ListLicensesOptions to LicensesService.List, see the query parameters.
  2. Generate iterator method LicensesService.ListIter.
  3. Add an integration test TestLicenses_ListIter showing that LicensesService.List is called at least twice. We have page: 1, per_page: 1, and number of featured licenses: 3. I think it's a good integration test because featured licenses change rarely.

Updates #3976

@alexandear

@codecov

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.52%. Comparing base (5bdc954) to head (3861b4a).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
github/licenses.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3981      +/-   ##
==========================================
- Coverage   93.52%   93.52%   -0.01%     
==========================================
  Files         207      207              
  Lines       17569    17590      +21     
==========================================
+ Hits        16432    16451      +19     
- Misses        937      938       +1     
- Partials      200      201       +1     

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

@alexandear

It's impossible to cover the line return nil, nil, err.

image

gmlewis

Choose a reason for hiding this comment

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

Not-Dhananjay-Mishra

Choose a reason for hiding this comment

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

@gmlewis