File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ describe('generateChangesetFromGit', () => {
290290 pr ?: {
291291 local ?: string ;
292292 remote ?: {
293- author : { login : string } ;
293+ author ? : { login : string } ;
294294 number : string ;
295295 body ?: string ;
296296 milestone ?: string ;
@@ -389,6 +389,19 @@ describe('generateChangesetFromGit', () => {
389389 { } ,
390390 '### Various fixes & improvements\n\n- Upgraded the kernel (#123) by @sentry' ,
391391 ] ,
392+ [
393+ 'Does not error when PR author is null' ,
394+ [
395+ {
396+ hash : 'abcdef1234567890' ,
397+ title : 'Upgraded the kernel' ,
398+ body : '' ,
399+ pr : { remote : { number : '123' } } ,
400+ } ,
401+ ] ,
402+ { } ,
403+ '### Various fixes & improvements\n\n- Upgraded the kernel (#123)' ,
404+ ] ,
392405 [
393406 'handle multiple commits properly' ,
394407 [
Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ interface CommitInfo {
380380 nodes : Array < {
381381 number : string ;
382382 body : string ;
383- author : {
383+ author ? : {
384384 login : string ;
385385 } ;
386386 milestone : {
@@ -472,7 +472,7 @@ async function getPRAndMilestoneFromCommit(
472472 hash . slice ( 1 ) ,
473473 pr
474474 ? {
475- author : pr . author . login ,
475+ author : pr . author ? .login ,
476476 pr : pr . number ,
477477 prBody : pr . body ,
478478 milestone : pr . milestone ?. number ?? null ,
You can’t perform that action at this time.
0 commit comments