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:
@@ -95,11 +95,21 @@ export class Repo extends CNBCore {
|
||||
page: params.page || 1,
|
||||
page_size: params.page_size || 999,
|
||||
}
|
||||
if(!_params.search) {
|
||||
if (!_params.search) {
|
||||
delete _params.search;
|
||||
}
|
||||
return this.get({ url, params: _params });
|
||||
}
|
||||
updateRepoInfo(repo: string, params: UpdateRepoInfo): Promise<any> {
|
||||
const url = `/${repo}`;
|
||||
return this.patch({ url, data: params });
|
||||
}
|
||||
}
|
||||
type UpdateRepoInfo = {
|
||||
description?: string;
|
||||
license?: 'MIT' | 'Apache-2.0' | 'GPL-3.0' | 'Unlicense';
|
||||
site?: string;
|
||||
topics?: string[];
|
||||
}
|
||||
|
||||
type CreateRepoData = {
|
||||
|
||||
Reference in New Issue
Block a user