File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,20 @@ export const changelogsSchema = z.object({
1010 . object ( {
1111 publish_date : z . string ( ) ,
1212 title : z . string ( ) . optional ( ) ,
13- description : z . string ( ) . optional ( ) ,
14- individual_page : z . boolean ( ) . optional ( ) ,
15- link : z . string ( ) . optional ( ) ,
1613 scheduled : z . boolean ( ) . optional ( ) ,
1714 scheduled_date : z . string ( ) . optional ( ) ,
1815 } )
16+ . and (
17+ z
18+ . object ( {
19+ individual_page : z . boolean ( ) ,
20+ link : z . string ( ) ,
21+ } )
22+ . or (
23+ z . object ( {
24+ description : z . string ( ) ,
25+ } ) ,
26+ ) ,
27+ )
1928 . array ( ) ,
2029} ) ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export async function getChangelogs(opts?: {
3939 productLink : product . data . productLink ,
4040 productAreaName : product . data . productArea ,
4141 productAreaLink : product . data . productAreaLink ,
42- individual_page : entry . link ,
42+ individual_page : entry . individual_page && entry . link ,
4343 } ;
4444 } ) ;
4545 } ) ;
You can’t perform that action at this time.
0 commit comments