This commit is contained in:
2026-01-12 03:16:35 +08:00
parent c2dcc53018
commit 5310ff28ae
48 changed files with 1349 additions and 254 deletions

View File

@@ -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));