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.
This commit is contained in:
20
test/repo.ts
20
test/repo.ts
@@ -5,9 +5,19 @@ 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'
|
||||
});
|
||||
// const listRes = await repo.getRepoList({
|
||||
// page: 1, page_size: 999, role: 'developer',
|
||||
// flags: 'KnowledgeBase'
|
||||
// });
|
||||
|
||||
console.log("listRes", showMore(listRes), listRes.data?.length);
|
||||
// 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();
|
||||
Reference in New Issue
Block a user