diff --git a/lib/v2/github/comments.js b/lib/v2/github/comments.js index ebb716eef2..0e6e634cd6 100644 --- a/lib/v2/github/comments.js +++ b/lib/v2/github/comments.js @@ -29,15 +29,13 @@ module.exports = async (ctx) => { Accept: 'application/vnd.github.v3+json', }; - const response = await got({ - url: `${apiUrl}/repos/${user}/${repo}/issues/${number}`, + const response = await got(`${apiUrl}/repos/${user}/${repo}/issues/${number}`, { headers, }); const issue = response.data; const type = issue.pull_request ? 'pull' : 'issue'; - const timelineResponse = await got({ - url: issue.timeline_url, + const timelineResponse = await got(issue.timeline_url, { headers, searchParams: { per_page: limit, @@ -81,6 +79,7 @@ module.exports = async (ctx) => { author: item.actor.login, pubDate: parseDate(item.created_at), guid: `${item.actor.login} ${item.event} on ${user}/${repo}: ${typeDict[type].title} #${issue.number} on ${item.created_at}`, + link: `${item.actor.login} ${item.event} on ${user}/${repo}: ${typeDict[type].title} #${issue.number} on ${item.created_at}`, }); break; case 'renamed':