1

我正在尝试检索所有者存储库并获取它的分叉数。但是当我运行特定文件时,我收到以下错误:

错误:wso2/github4:0.9.10:GitClientError,消息:“存储库”类型上不存在字段“许可证”

下面显示的是我的代码:

import ballerina/config;  
import ballerina/http;

import ballerina/io;

import wso2/github4;  
import wso2/sonarqube6;

 function main(string... args) {

     json summary = check getLineCoverageSummary();
     io:println(summary); }

 function getLineCoverageSummary() returns json|error {

     endpoint github4:Client githubEP {
         clientConfig: {
             auth: {
                 scheme: http:OAUTH2,
                 accessToken: config:getAsString("GITHUB_TOKEN")
             }
         }
     };

     json summaryJson;
         github4:Repository repository;
     var repo = githubEP->getRepository("suleka96/backend-routes-temp");
     match repo {
         github4:Repository reposi => {
             repository = reposi;
             summaryJson = repository.forkCount;
         }
         github4:GitClientError err => {
             return err;
         }
     }  


     return summaryJson; 
}

任何帮助深表感谢!先感谢您!

4

1 回答 1

0

该问题现已修复,更新后的 GitHub 连接器已推送到 Ballerina Central,版本为 0.9.13。

https://central.ballerina.io/wso2/github4

拉出更新的连接器,然后再试一次! ballerina pull wso2/github4

于 2018-07-18T05:56:24.400 回答