3 var ghRelease = require('./github.js');
6 * Gets the releases for 'ripgrep'. This function could be trimmed down and made
7 * for use with any github release.
10 * @param {string} owner
11 * @param {string} repo
12 * @returns {PromiseLike<any> | Promise<any>}
14 function getAllReleases(request, owner, repo, baseurl) {
16 return Promise.reject('missing baseurl');
18 return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function (all) {
23 module.exports = getAllReleases;
25 if (module === require.main) {
26 getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
28 console.log(JSON.stringify(all, null, 2));