Skip to content

Instantly share code, notes, and snippets.

@ptomulik
Created January 8, 2021 00:00
Show Gist options
  • Save ptomulik/861577994a71587cd9a446a3c5ac26a2 to your computer and use it in GitHub Desktop.
Save ptomulik/861577994a71587cd9a446a3c5ac26a2 to your computer and use it in GitHub Desktop.
List release names for github repository
"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