export default async function getPull(repo, id) { const pull = await repo.pulls(id).fetch(); return { id: pull.id, url: pull.url, number: pull.number, state: pull.state, title: pull.title, labels: pull.labels.map(label => label.name), }; }