update
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { AiBase } from "../src/ai/index.ts";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
|
||||
const repo = new AiBase({ group: "kevisual/demo", token: token, cookie: cookie });
|
||||
// group: "kevisual/demo",
|
||||
const repo = new AiBase({ token: token, cookie: cookie });
|
||||
|
||||
const res = await repo.autoPr("test-cnb", {
|
||||
body: "请帮我给README文件添加一句问候语",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Build } from "../src/index.ts";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
|
||||
const repo = new Build({ group: "kevisual", token: token, cookie: cookie });
|
||||
// group: "kevisual",
|
||||
const repo = new Build({ token: token, cookie: cookie });
|
||||
|
||||
const main = async () => {
|
||||
const build = await repo.startBuild('cnb', {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Repo } from "../src/repo";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
|
||||
const repo = new Repo({ group: "kevisual/demo", token: token, cookie: cookie });
|
||||
const repo = new Repo({ token: token, cookie: cookie });
|
||||
|
||||
// const res = await repo.createRepo({
|
||||
// name: "test-cnb-2",
|
||||
@@ -25,15 +25,15 @@ const repoName = "test-cnb";
|
||||
|
||||
// const preCommitSha = commitList.length > 0 ? commitList[0].sha : undefined;
|
||||
|
||||
const commitRes = await repo.createCommit(repoName, {
|
||||
message: "Initial commit3",
|
||||
files: [
|
||||
{ path: "README.md", content: "# Hello World\nThis is my first commit!", encoding: 'raw' },
|
||||
{ path: "a.md", content: "# Hello World\nThis is my first commit2!", encoding: 'raw' },
|
||||
],
|
||||
});
|
||||
// const commitRes = await repo.createCommit(repoName, {
|
||||
// message: "Initial commit3",
|
||||
// files: [
|
||||
// { path: "README.md", content: "# Hello World\nThis is my first commit!", encoding: 'raw' },
|
||||
// { path: "a.md", content: "# Hello World\nThis is my first commit2!", encoding: 'raw' },
|
||||
// ],
|
||||
// });
|
||||
|
||||
console.log("commitRes", showMore(commitRes));
|
||||
// console.log("commitRes", showMore(commitRes));
|
||||
|
||||
|
||||
|
||||
|
||||
3
test/get-ueserinfo.ts
Normal file
3
test/get-ueserinfo.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { cnb, showMore } from './common.ts';
|
||||
const res = await cnb.user.getCurrentUser();
|
||||
console.log("get-ueserinfo: getCurrentUser", res);
|
||||
28
test/issue.ts
Normal file
28
test/issue.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Issue } from "../src/issue/index.ts";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
// group: "kevisual",
|
||||
const issue = new Issue({ token: token, cookie: cookie });
|
||||
// const res = await issue.createIssue("cnb", {
|
||||
// title: "测试通过 API 创建 Issue",
|
||||
// })
|
||||
|
||||
// console.log(res);
|
||||
|
||||
// const updateIssueRes = await issue.updateIssue("cnb", 1, {
|
||||
// title: "测试通过 API 更新 Issue2",
|
||||
// state: "closed",
|
||||
// state_reason: "completed",
|
||||
// });
|
||||
// console.log(showMore(updateIssueRes));
|
||||
|
||||
const itemIssueRes = await issue.getItem("cnb", 1);
|
||||
console.log(showMore(itemIssueRes));
|
||||
|
||||
const listIssueRes = await issue.getList("cnb", {
|
||||
state: "open",
|
||||
});
|
||||
console.log(showMore(listIssueRes));
|
||||
|
||||
const commentListRes = await issue.getCommentList("cnb", 1);
|
||||
console.log(showMore(commentListRes));
|
||||
@@ -1,8 +1,8 @@
|
||||
import { KnowledgeBase } from "../src/knowledge/index.ts";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
|
||||
const repo = new KnowledgeBase({ group: "kevisual/test", token: token, cookie: cookie });
|
||||
// group: "kevisual/test",
|
||||
const repo = new KnowledgeBase({ token: token, cookie: cookie });
|
||||
const repoName = "test-local-docs";
|
||||
|
||||
// const queryRes = await repo.getEmbeddingModels(repoName);
|
||||
|
||||
12
test/mission.ts
Normal file
12
test/mission.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { cnb, showMore } from './common.ts'
|
||||
|
||||
const mission = await cnb.mission.getMissions("kevisual")
|
||||
console.log("mission", mission);
|
||||
|
||||
// const listViews = await cnb.mission.getMissionViewList('kevisual/projects');
|
||||
|
||||
// console.log("listViews", showMore(listViews));
|
||||
|
||||
const viewConfig = await cnb.mission.getMissionViewConfig('kevisual/projects', '2010203541532721152');
|
||||
|
||||
console.log("viewConfig", showMore(viewConfig));
|
||||
@@ -2,7 +2,7 @@ import { Repo } from "../src/repo";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
|
||||
const repo = new Repo({ group: "kevisual/demo", token: token, cookie: cookie });
|
||||
const repo = new Repo({ token: token, cookie: cookie });
|
||||
|
||||
|
||||
const listRes = await repo.getRepoList({ page: 1, page_size: 10 });
|
||||
|
||||
Reference in New Issue
Block a user