mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-03 18:48:12 +08:00
fix(route): github cross-referenced event cache key (#10516)
This commit is contained in:
@@ -29,15 +29,13 @@ module.exports = async (ctx) => {
|
|||||||
Accept: 'application/vnd.github.v3+json',
|
Accept: 'application/vnd.github.v3+json',
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await got({
|
const response = await got(`${apiUrl}/repos/${user}/${repo}/issues/${number}`, {
|
||||||
url: `${apiUrl}/repos/${user}/${repo}/issues/${number}`,
|
|
||||||
headers,
|
headers,
|
||||||
});
|
});
|
||||||
const issue = response.data;
|
const issue = response.data;
|
||||||
const type = issue.pull_request ? 'pull' : 'issue';
|
const type = issue.pull_request ? 'pull' : 'issue';
|
||||||
|
|
||||||
const timelineResponse = await got({
|
const timelineResponse = await got(issue.timeline_url, {
|
||||||
url: issue.timeline_url,
|
|
||||||
headers,
|
headers,
|
||||||
searchParams: {
|
searchParams: {
|
||||||
per_page: limit,
|
per_page: limit,
|
||||||
@@ -81,6 +79,7 @@ module.exports = async (ctx) => {
|
|||||||
author: item.actor.login,
|
author: item.actor.login,
|
||||||
pubDate: parseDate(item.created_at),
|
pubDate: parseDate(item.created_at),
|
||||||
guid: `${item.actor.login} ${item.event} on ${user}/${repo}: ${typeDict[type].title} #${issue.number} on ${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;
|
break;
|
||||||
case 'renamed':
|
case 'renamed':
|
||||||
|
|||||||
Reference in New Issue
Block a user