Skip to content

Commit e7f9165

Browse files
authored
Fix the issue for forked branch (Azure#19432)
Co-authored-by: wyunchi-ms <[email protected]>
1 parent d791248 commit e7f9165

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/FilesChangedTask.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public override bool Execute()
110110
}
111111
catch (AuthorizationException e)
112112
{
113-
client.Credentials = null;
113+
Console.WriteLine(e.Message);
114+
client = new GitHubClient(new ProductHeaderValue("Azure"));
114115
files = client.PullRequest.Files(RepositoryOwner, RepositoryName, int.Parse(PullRequestNumber))
115116
.ConfigureAwait(false).GetAwaiter().GetResult();
116117
}

0 commit comments

Comments
 (0)