Browse Source

Fix getting versions on no token

pull/570/head
Halil ibrahim Kalkan 8 years ago
parent
commit
bacd3313eb
  1. 11
      modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/GithubDocumentStore.cs

11
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),

Loading…
Cancel
Save