if (!baseurl) {
return Promise.reject('missing baseurl');
}
- return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function (all) {
+ return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function (
+ all
+ ) {
return all;
});
}
module.exports = getAllReleases;
if (module === require.main) {
- getAllReleases(require('@root/request'), 'coolaj86', 'go-pathman', 'https://git.coolaj86.com').then(
- //getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
+ getAllReleases(
+ require('@root/request'),
+ 'coolaj86',
+ 'go-pathman',
+ 'https://git.coolaj86.com'
+ ).then(
+ //getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
function (all) {
console.log(JSON.stringify(all, null, 2));
}
* @param {string} repo
* @returns {PromiseLike<any> | Promise<any>}
*/
-function getAllReleases(request, owner, repo, baseurl = 'https://api.github.com') {
+function getAllReleases(
+ request,
+ owner,
+ repo,
+ baseurl = 'https://api.github.com'
+) {
if (!owner) {
return Promise.reject('missing owner for repo');
}
json: true
}).then(function (resp) {
var body = resp.body;
- all.download = body.base_url + '/{{ download }}'
+ all.download = body.base_url + '/{{ download }}';
body.releases.forEach(function (asset) {
if (!map[asset.channel]) {
map[asset.channel] = true;
var github = require('../_common/gitea.js');
var owner = 'coolaj86';
var repo = 'go-pathman';
-var baseurl = 'https://git.coolaj86.com'
+var baseurl = 'https://git.coolaj86.com';
module.exports = function (request) {
return github(request, owner, repo, baseurl).then(function (all) {