【问题标题】:field 'license' doesn't exist on type 'Repository' error in Ballerina github4 apiBallerina github4 api 中的“存储库”类型错误中不存在字段“许可证”
【发布时间】:2018-07-06 17:17:19
【问题描述】:

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

错误: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; 
}

非常感谢任何帮助!先感谢您!

【问题讨论】:

    标签: ballerina


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-04
      • 2021-07-14
      • 2018-12-22
      • 2020-03-24
      • 1970-01-01
      • 2012-07-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多