File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ class CommitNode {
2323
2424 if ($subject -match " \(#(\d+)\)" ) {
2525 $this.PullRequest = $Matches [1 ]
26- } else {
27- throw " PR number is missing from the commit subject. (commit: $hash )"
2826 }
2927 }
3028}
@@ -175,10 +173,13 @@ function Get-ChangeLog
175173 $commit.AuthorGitHubLogin = $community_login_map [$commit.AuthorEmail ]
176174 } else {
177175 $uri = " https://api.github.com/repos/PowerShell/PowerShell/commits/$ ( $commit.Hash ) "
178- $response = Invoke-WebRequest - Uri $uri - Method Get - Headers $header
179- $content = ConvertFrom-Json - InputObject $response.Content
180- $commit.AuthorGitHubLogin = $content.author.login
181- $community_login_map [$commit.AuthorEmail ] = $commit.AuthorGitHubLogin
176+ $response = Invoke-WebRequest - Uri $uri - Method Get - Headers $header - ErrorAction SilentlyContinue
177+ if ($response )
178+ {
179+ $content = ConvertFrom-Json - InputObject $response.Content
180+ $commit.AuthorGitHubLogin = $content.author.login
181+ $community_login_map [$commit.AuthorEmail ] = $commit.AuthorGitHubLogin
182+ }
182183 }
183184 $commit.ChangeLogMessage = " - {0} (Thanks @{1}!)" -f $commit.Subject , $commit.AuthorGitHubLogin
184185 }
You can’t perform that action at this time.
0 commit comments