public string GetHtmlUrl(IGitHubRepositoryIdentifiers identifiers, string branchName) { string filePath = this.Path; return(String.Format("https://github.com/{0}/{1}/blob/{2}/{3}", identifiers.RepositoryOwner, identifiers.RepositoryName, branchName, filePath)); }
public async Task<IReadOnlyList<Branch>> GetBranchesAsync(IGitHubRepositoryIdentifiers repositoryIdentifiers) { await EnsureCredentialsAsync().ConfigureAwait(false); var branches = await ExecuteWithErrorTrappingAsync(() => _gitHubClient.Repository.GetAllBranches(repositoryIdentifiers.RepositoryOwner, repositoryIdentifiers.RepositoryName)) .ConfigureAwait(false); return branches; }
public async Task<IReadOnlyList<Issue>> GetIssuesAsync(IGitHubRepositoryIdentifiers repositoryIdentifiers) { await EnsureCredentialsAsync().ConfigureAwait(false); var issues = await ExecuteWithErrorTrappingAsync(() => _gitHubClient.Issue.GetAllForRepository(repositoryIdentifiers.RepositoryOwner, repositoryIdentifiers.RepositoryName)) .ConfigureAwait(false); return issues; }
public async Task<IReadOnlyList<GitHubCommit>> GetCommitsAsync(IGitHubRepositoryIdentifiers repositoryIdentifiers) { await EnsureCredentialsAsync().ConfigureAwait(false); var commits = await ExecuteWithErrorTrappingAsync(() => _gitHubClient.Repository.Commits.GetAll(repositoryIdentifiers.RepositoryOwner, repositoryIdentifiers.RepositoryName)) .ConfigureAwait(false); return commits; }
public async Task<TreeResponse> GetTreeRecursiveAsync(IGitHubRepositoryIdentifiers repositoryIdentifiers, string sha) { await EnsureCredentialsAsync().ConfigureAwait(false); var response = await ExecuteWithErrorTrappingAsync( () => _gitHubClient.GitDatabase.Tree.GetRecursive(repositoryIdentifiers.RepositoryOwner, repositoryIdentifiers.RepositoryName, sha)) .ConfigureAwait(false); return response; }
public async Task<IReadOnlyList<RepositoryContent>> GetContentsAsync(IGitHubRepositoryIdentifiers repositoryIdentifiers, string contentPath) { await EnsureCredentialsAsync().ConfigureAwait(false); var contents = await ExecuteWithErrorTrappingAsync( () => _gitHubClient.Repository.Content.GetAllContents(repositoryIdentifiers.RepositoryOwner, repositoryIdentifiers.RepositoryName, contentPath)) .ConfigureAwait(false); return contents; }
public string GetHtmlUrl(IGitHubRepositoryIdentifiers identifiers, string branchName) { string filePath = this.Path; return String.Format("https://github.com/{0}/{1}/blob/{2}/{3}", identifiers.RepositoryOwner, identifiers.RepositoryName, branchName, filePath); }