初始化 Gitea 项目结构,添加核心 API 封装和相关配置文件
This commit is contained in:
13
test/common.ts
Normal file
13
test/common.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { GiteaRepo } from "../src/repo";
|
||||
import { useKey } from "@kevisual/context";
|
||||
const repo = new GiteaRepo({
|
||||
token: useKey("GITEA_TOKEN"),
|
||||
baseURL: useKey("GITEA_URL"),
|
||||
});
|
||||
|
||||
const createRepo = async () => {
|
||||
const res = await repo.createRepo({ name: "kevisual/test-repo", description: "This is a test repository", private: false });
|
||||
console.log('createRepo', res);
|
||||
};
|
||||
|
||||
createRepo();
|
||||
Reference in New Issue
Block a user