feat: Fix link in Github's PR (#3686)

This commit is contained in:
orklah
2020-01-07 07:39:45 +01:00
committed by DIYgod
parent fc81e047ff
commit 68c6a2cf37

View File

@@ -9,6 +9,7 @@ module.exports = async (ctx) => {
const repo = ctx.params.repo;
const host = `https://github.com/${user}/${repo}/pulls`;
const link = `https://github.com/${user}/${repo}/pull`;
const url = `https://api.github.com/repos/${user}/${repo}/pulls`;
const response = await got({
@@ -28,7 +29,7 @@ module.exports = async (ctx) => {
title: item.title,
description: md.render(item.body) || 'No description',
pubDate: new Date(item.created_at).toUTCString(),
link: `${host}/${item.number}`,
link: `${link}/${item.number}`,
})),
};
};