Skip to content

Commit e55ade5

Browse files
authored
fix(route/github): fix pr url (#21974)
1 parent 3c1883c commit e55ade5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/routes/github/notifications.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ async function handler(ctx) {
4848
let originUrl = item.subject.url ? item.subject.url.replace('https://api.github.com/repos/', 'https://github.com/') : 'https://github.com/notifications';
4949
if (originUrl.includes('/releases/')) {
5050
originUrl = originUrl.replace(/\/releases\/\d+$/, '/releases');
51+
} else if (originUrl.includes('/pulls/')) {
52+
originUrl = originUrl.replace(/\/pulls\/(\d+)$/, '/pull/$1');
5153
}
5254
return {
5355
title: item.subject.title,

0 commit comments

Comments
 (0)