-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement tag fetching for rest api as well
- Loading branch information
Axel Rindle
committed
May 2, 2020
1 parent
17bc1e2
commit 6de6a17
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Maps a response object into the form described here: | ||
* https://github.com/axelrindle/github-version-checker/wiki/API#releases | ||
*/ | ||
module.exports.release = obj => { | ||
return { | ||
name: obj.name, | ||
tag: { | ||
name: obj.tag_name | ||
}, | ||
isPrerelease: obj.prerelease, | ||
publishedAt: obj.published_at, | ||
url: obj.html_url | ||
} | ||
}; | ||
|
||
/** | ||
* Maps a response object into the form described here: | ||
* https://github.com/axelrindle/github-version-checker/wiki/API#tags | ||
*/ | ||
module.exports.tag = obj => { | ||
return { | ||
name: obj.name | ||
} | ||
}; |