Files
gh-action-bot/src/lib/get_pull.mjs

13 lines
298 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,
owner: pull.user.login,
state: pull.state,
title: pull.title,
labels: pull.labels.map(label => label.name),
};
}