Files
cnb/test/repo.ts
xiongxiao 02a4b86338 feat: add updateRepoInfo method to Repo class and implement build configuration
- Introduced `updateRepoInfo` method in the `Repo` class to allow updating repository information such as description, license, site, and topics.
- Updated test cases to demonstrate the usage of the new `updateRepoInfo` method.
- Modified build script to include a configuration for triggering builds with specific events and environment variables.
- Commented out previous repository list fetching code in tests for clarity.
2026-02-09 00:26:54 +08:00

23 lines
610 B
TypeScript

import { Repo } from "../src/repo";
import { token, showMore, cookie } from "./common.ts";
const repo = new Repo({ token: token, cookie: cookie });
// const listRes = await repo.getRepoList({
// page: 1, page_size: 999, role: 'developer',
// flags: 'KnowledgeBase'
// });
// console.log("listRes", showMore(listRes), listRes.data?.length);
const updateRepo = async () => {
const res = await repo.updateRepoInfo('kevisual/cnb', {
description: 'cnb 的 opencode 和 rest 的 api 进行封装和使用',
topics: ['cnb', 'api']
});
console.log("updateRepo", showMore(res));
}
updateRepo();