12 lines
270 B
JavaScript
12 lines
270 B
JavaScript
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),
|
|
};
|
|
}
|