feat: fetch data for prs that need retest
This commit is contained in:
11
src/lib/get_pull.mjs
Normal file
11
src/lib/get_pull.mjs
Normal 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),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user