make Prettier

This commit is contained in:
AJ ONeal
2020-05-03 10:49:06 +00:00
parent c32ea6d98e
commit fa2dcece4c
4 changed files with 18 additions and 6 deletions

View File

@@ -15,7 +15,9 @@ function getAllReleases(request, owner, repo, baseurl) {
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;
});
}
@@ -23,8 +25,13 @@ function getAllReleases(request, owner, repo, baseurl) {
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));
}

View File

@@ -9,7 +9,12 @@
* @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');
}