_requestAllPages(path, options, cb, results) {
      results = results || [];

      return this._request('GET', path, options)
         .then((response) => {
            let thisGroup;
            if (response.data instanceof Array) {
               thisGroup = response.data;
            } else if (response.data.items instanceof Array) {
               thisGroup = response.data.items;
            } else {
               let message = `cannot figure out how to append ${response.data} to the result set`;
               throw new ResponseError(message, path, response);
            }
            results.push(...thisGroup);

            const nextUrl = getNextPage(response.headers.link);
            if(nextUrl) {
               if (!options) {
                  options = {};
               }
               options.page = parseInt(
                 nextUrl.match(/([&\?]page=[0-9]*)/g)
                   .shift()
                   .split('=')
                   .pop()
               );
               if (!(options && typeof options.page !== 'number')) {
                  log(`getting next page: ${nextUrl}`);
                  return this._requestAllPages(nextUrl, options, cb, results);
               }
            }

            if (cb) {
               cb(null, results, response);
            }

            response.data = results;
            return response;
         }).catch(callbackErrorOrThrow(cb, path));
   }
Make a request and fetch all the available data. Github will paginate responses so for queries
that might span multiple pages this method is preferred to {@link Requestable#request}
@param {string} path - the path to request
@param {Object} options - the query parameters to include
@param {Requestable.callback} [cb] - the function to receive the data. The returned data will always be an array.
@param {Object[]} results - the partial results. This argument is intended for internal use only.
@return {Promise} - a promise which will resolve when all pages have been fetched
@deprecated This will be folded into {@link Requestable#_request} in the 2.0 release.