Created
January 8, 2021 00:00
-
-
Save ptomulik/861577994a71587cd9a446a3c5ac26a2 to your computer and use it in GitHub Desktop.
List release names for github repository
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
"use strict"; | |
const { Octokit } = require("@octokit/rest"); | |
const octokit = new Octokit({ | |
auth: 'my-personal-token' | |
}); | |
octokit.paginate( | |
octokit.repos.listReleases, | |
{ | |
owner: "code-lts", | |
repo: "doctum", | |
per_page: 3 | |
}, | |
({ data }, done) => { | |
return data.map((d) => { return d["name"];}); | |
} | |
).then((data) => { | |
console.log(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment