File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -207,10 +207,12 @@ addTests('isProjects', [
207
207
'https://github.com/sindresorhus/refined-github/projects' ,
208
208
] ) ;
209
209
210
- export const isDiscussion = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ d i s c u s s i o n s \/ \d + / . test ( getRepo ( url ) ?. path ?? getOrg ( url ) ?. path ! ) ;
210
+ export const isDiscussion = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ( / ^ d i s c u s s i o n s \/ \d + / . test ( getRepo ( url ) ?. path ?? getOrg ( url ) ?. path ! ) ) || getRepo ( url ) ?. path === 'discussions/new' ;
211
211
addTests ( 'isDiscussion' , [
212
212
'https://github.com/tophf/mpiv/discussions/50' ,
213
213
'https://github.com/orgs/community/discussions/11202' ,
214
+ 'https://github.com/withastro/roadmap/discussions/new' ,
215
+ 'https://github.com/withastro/roadmap/discussions/new?category=proposal' ,
214
216
] ) ;
215
217
216
218
export const isDiscussionList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => getRepo ( url ) ?. path === 'discussions' || getOrg ( url ) ?. path === 'discussions' ;
You can’t perform that action at this time.
0 commit comments