feat: fetch data for prs that need retest

This commit is contained in:
2018-10-17 15:56:11 -07:00
parent b6b5c27ffc
commit d1cfd7c20b
8 changed files with 164 additions and 4 deletions

11
src/lib/get_pull.mjs Normal file
View File

@@ -0,0 +1,11 @@
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),
};
}