github icon indicating copy to clipboard operation
github copied to clipboard

Add options to the listReleases and listTags function

Open alexcanessa opened this issue 7 years ago • 3 comments

The request to get the list of releases and tags should have the options object in order to pass pagination options.

@see https://developer.github.com/v3/#pagination

alexcanessa avatar Oct 12 '17 22:10 alexcanessa

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@24223f7). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #485   +/-   ##
=========================================
  Coverage          ?   91.06%           
=========================================
  Files             ?       12           
  Lines             ?      403           
  Branches          ?        0           
=========================================
  Hits              ?      367           
  Misses            ?       36           
  Partials          ?        0
Impacted Files Coverage Δ
lib/Repository.js 80.67% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 24223f7...a37e56f. Read the comment docs.

codecov-io avatar Oct 12 '17 23:10 codecov-io

I'm wondering if there's maybe an alternative way to handle paging. This is going to be an issue with basically every get operation this library does. Would it be crazy to think about doing some sort of async iterables approach? The new for await ... of seems pretty cool, but wouldn't work for us, since we also allow people to use callbacks.

What if we used generators and for people using callbacks, we just accumulated the result and returned that. For people using Promises, we could yield Promises until the results are done. It looks like yield was added in Node 4, but has no IE support.

@clayreimann Which browsers and versions does github-api support?

j-rewerts avatar Apr 07 '19 22:04 j-rewerts

Just adding options to most GETs would definitely work though.

j-rewerts avatar Apr 07 '19 22:04 j-rewerts