當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript GHRepository.list方法代碼示例

本文整理匯總了TypeScript中gh-issues-api.GHRepository.list方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript GHRepository.list方法的具體用法?TypeScript GHRepository.list怎麽用?TypeScript GHRepository.list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gh-issues-api.GHRepository的用法示例。


在下文中一共展示了GHRepository.list方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: FilterCollection

 var promises = labels.map(label => {
   var filterCollection = new FilterCollection();
   filterCollection.label = new IssueLabelFilter(label);
   return Promise.all([
     repo.list(IssueType.All, IssueState.Open, filterCollection).then(issues => report[label] = issues.length),
     repo.list(IssueType.All, IssueState.Open).then(issues => report['total'] = issues.length)
   ]);
 });
開發者ID:pierreca,項目名稱:dashboards,代碼行數:8,代碼來源:shiproom_report.ts

示例2: function

var countcmd = function(params: Array<string>) {
    var query = translateParams(params);
    repo.list(query.type, query.state, query.filters).then(issues => {
        console.log(issues.length);
        startPrompt();
    });
};
開發者ID:pierreca,項目名稱:dashboards,代碼行數:7,代碼來源:ghprompt.ts

示例3:

 .then(() => repo.list(IssueType.Issue, IssueState.Open, notUpdated))
開發者ID:pierreca,項目名稱:dashboards,代碼行數:1,代碼來源:stale_issues.ts

示例4:

repo.loadAllIssues().then(() => {
    return Promise.all([
        repo.list(IssueType.Issue, IssueState.Open),
        repo.list(IssueType.Issue, IssueState.Closed),
        repo.list(IssueType.PullRequest, IssueState.Open),
        repo.list(IssueType.PullRequest, IssueState.Closed),
        repo.list(IssueType.Issue, IssueState.All, createdLastWeek),
        repo.list(IssueType.Issue, IssueState.Open, updatedLastWeek),
        repo.list(IssueType.Issue, IssueState.Closed, closedLastWeek),
        repo.list(IssueType.PullRequest, IssueState.All, createdLastWeek),
        repo.list(IssueType.PullRequest, IssueState.Open, updatedLastWeek),
        repo.list(IssueType.PullRequest, IssueState.Closed, closedLastWeek),
        repo.list(IssueType.Issue, IssueState.All, createdLastDay),
        repo.list(IssueType.Issue, IssueState.Open, updatedLastDay),
        repo.list(IssueType.Issue, IssueState.Closed, closedLastDay),
        repo.list(IssueType.PullRequest, IssueState.All, createdLastDay),
        repo.list(IssueType.PullRequest, IssueState.Open, updatedLastDay),
        repo.list(IssueType.PullRequest, IssueState.Closed, closedLastDay)
    ]);
}).then(function(issuesList){
開發者ID:pierreca,項目名稱:dashboards,代碼行數:20,代碼來源:ghquery.ts


注:本文中的gh-issues-api.GHRepository.list方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。