コード例 #1
0
ファイル: GhTreeItem.cs プロジェクト: christophwille/wpaghapp
        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));
        }
コード例 #2
0
ファイル: GhService.cs プロジェクト: christophwille/wpaghapp
        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;
        }
コード例 #3
0
ファイル: GhService.cs プロジェクト: christophwille/wpaghapp
        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;
        }
コード例 #4
0
ファイル: GhService.cs プロジェクト: christophwille/wpaghapp
        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;
        }
コード例 #5
0
ファイル: GhService.cs プロジェクト: christophwille/wpaghapp
        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;
        }
コード例 #6
0
ファイル: GhService.cs プロジェクト: christophwille/wpaghapp
        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;
        }
コード例 #7
0
ファイル: GhTreeItem.cs プロジェクト: gautamkrishnar/wpaghapp
 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);
 }