File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -292,13 +292,13 @@ describe('modules/platform/forgejo/index', () => {
292292 const scope = httpMock . scope ( 'https://code.forgejo.org/api/v1' ) ;
293293 scope
294294 . get ( '/user' )
295- . reply ( 200 , mockUser )
295+ . reply ( 200 , { ... mockUser , full_name : '' } )
296296 . get ( '/version' )
297297 . reply ( 200 , { version : FORGEJO_VERSION } ) ;
298298
299299 expect ( await forgejo . initPlatform ( { token : 'some-token' } ) ) . toEqual ( {
300300 endpoint : 'https://code.forgejo.org/' ,
301- gitAuthor : 'Renovate Bot <renovate@example.com>' ,
301+ gitAuthor : 'renovate <renovate@example.com>' ,
302302 } ) ;
303303 } ) ;
304304
Original file line number Diff line number Diff line change @@ -227,7 +227,8 @@ const platform: Platform = {
227227 let gitAuthor : string ;
228228 try {
229229 const user = await helper . getCurrentUser ( { token } ) ;
230- gitAuthor = `${ user . full_name ?? user . username } <${ user . email } >` ;
230+ // oxlint-disable-next-line typescript/prefer-nullish-coalescing -- `full_name` can be emtpy string
231+ gitAuthor = `${ user . full_name || user . username } <${ user . email } >` ;
231232 botUserID = user . id ;
232233 botUserName = user . username ;
233234 const env = getEnv ( ) ;
Original file line number Diff line number Diff line change @@ -284,13 +284,13 @@ describe('modules/platform/gitea/index', () => {
284284 const scope = httpMock . scope ( 'https://gitea.com/api/v1' ) ;
285285 scope
286286 . get ( '/user' )
287- . reply ( 200 , mockUser )
287+ . reply ( 200 , { ... mockUser , full_name : '' } )
288288 . get ( '/version' )
289289 . reply ( 200 , { version : GITEA_VERSION } ) ;
290290
291291 expect ( await gitea . initPlatform ( { token : 'some-token' } ) ) . toEqual ( {
292292 endpoint : 'https://gitea.com/' ,
293- gitAuthor : 'Renovate Bot <renovate@example.com>' ,
293+ gitAuthor : 'renovate <renovate@example.com>' ,
294294 } ) ;
295295 } ) ;
296296
Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ const platform: Platform = {
223223 let gitAuthor : string ;
224224 try {
225225 const user = await helper . getCurrentUser ( { token } ) ;
226- gitAuthor = `${ user . full_name ?? user . username } <${ user . email } >` ;
226+ // oxlint-disable-next-line typescript/prefer-nullish-coalescing -- `full_name` can be emtpy string
227+ gitAuthor = `${ user . full_name || user . username } <${ user . email } >` ;
227228 botUserID = user . id ;
228229 botUserName = user . username ;
229230 const env = getEnv ( ) ;
You can’t perform that action at this time.
0 commit comments