diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/GithubDocumentStore.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/GithubDocumentStore.cs index 530c8c145f..38c933bf2c 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/GithubDocumentStore.cs +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/GithubDocumentStore.cs @@ -86,15 +86,10 @@ namespace Volo.Docs.Documents { var token = projectExtraProperties["GithubAccessToken"]?.ToString(); - ICredentialStore credentialStore = token.IsNullOrWhiteSpace() - ? null - : new InMemoryCredentialStore(new Credentials(token)); + var gitHubClient = token.IsNullOrWhiteSpace() + ? new GitHubClient(new ProductHeaderValue("AbpWebSite")) + : new GitHubClient(new ProductHeaderValue("AbpWebSite"), new InMemoryCredentialStore(new Credentials(token))); - var gitHubClient = new GitHubClient( - new ProductHeaderValue("AbpWebSite"), - credentialStore - ); - var url = projectExtraProperties["GithubRootUrl"].ToString(); var releases = await gitHubClient.Repository.Release.GetAll( GetGithubOrganizationNameFromUrl(url),