随笔 - 146  文章 - 0 评论 - 10 阅读 - 80830
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

参考: GitHub API for Java – (kohsuke.org)

依赖:

<dependency>
  <groupId>org.kohsuke</groupId>
  <artifactId>github-api</artifactId>
  <version>1.135</version>
</dependency>

 

public GithubClient(String accessToken){

  try{

        github=GitHub.connectToEnterpriseWithOAuth("https://domain/api/v3",null,accessToken);
        userid=github.getMyself().getLogin();
        userName=github.getMyself()/getName();


    }.....

}
public getRepository(String org,String repo){

  try{
    return github.getOrganization(org).getRepository(repo);

  }....


}

public static String loadBranchFileContent(String org,String repo,String branchName,String path){

   GHBranch branch=gitrepo.getBranch(branchName);
   String branchRef=branch.getSHA1;
   GHContent content=gitrepo.getFileContent(path,branchref);
   Systom.out.println(content.getDownloadUrl())
   .....
}

 

posted @ 2023-10-21 18:08 EZgod 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 参考文档: https://www.cnblogs.com/songxingzhu/p/10119378.html <!--Begin LogBack Log--> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-clas 阅读全文
posted @ 2023-10-21 12:23 EZgod 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 参考文档: https://www.bilibili.com/read/cv22893728/ 使用到的以来: <dependency> <groupId>com.github.javaparser</groupId> <artifactId>javaparser-core</artifactId> 阅读全文
posted @ 2023-10-21 12:18 EZgod 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 参考文档: https://www.codelast.com/%E5%8E%9F%E5%88%9B-java%E5%8A%A8%E6%80%81%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95%E5%88%B0classpath%E4%B8 阅读全文
posted @ 2023-10-21 12:11 EZgod 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 固定窗口计数器算法 规定我们单位时间处理的请求数量。比如我们规定我们的一个接口一分钟只能访问10次的话。使用固定窗口计数器算法的话可以这样实现:给定一个变量counter来记录处理的请求数量,当1分钟之内处理一个请求之后counter+1,1分钟之内的如果counter=10的话,后续的请求就会被全 阅读全文
posted @ 2023-02-23 20:30 EZgod 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1,单数据库自增ID 第一种方案仍然还是基于数据库的自增ID,需要单独使用一个数据库实例,在这个实例中新建一个单独的表: CREATE DATABASE `SEQID`; CREATE TABLE SEQID.SEQUENCE_ID ( id bigint(20) unsigned NOT NULL 阅读全文
posted @ 2023-02-23 20:21 EZgod 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 查看集群各节点角色: [root@k8s-master-2 ~]# kubectl get nodes NAME STATUS ROLES AGE VERSION k8s-master-1 Ready master 45d v1.23.2 k8s-master-2 Ready control-pla 阅读全文
posted @ 2023-02-11 11:20 EZgod 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 图中kube-dns只是一个service,但是他对外提供k8s集群内部的dns服务,真正的dns server,是 coredns这几个pod k8s namespace 的作用只是提供逻辑上的组件隔离例如pod service ,deployment等,实际上不同namespace 之间都是通过 阅读全文
posted @ 2023-02-03 10:58 EZgod 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 问题描述: Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pul 解决办法: 1,注意虚拟机时间同步 chronyc sources ntpdate time1.aliyun.com 2,注意修改co 阅读全文
posted @ 2023-02-03 10:03 EZgod 阅读(880) 评论(0) 推荐(0) 编辑
摘要: Kotlinbase.kt @file:JvmName("kotlinbaseTest") import kotlin.math.roundToInt as atoInt fun main() { /*val number=99 val result= if (number in 10..59){ 阅读全文
posted @ 2022-12-12 10:50 EZgod 阅读(25) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示