
Cnb Skill
- 8 installs
- 33 repo stars
- Updated April 26, 2026
- bighardperson/computer-science-skills-collection
cnb-skill is a skill that wraps the CNB code-hosting platform's REST API as a command-line tool for issues, pull requests and repository operations.
About
cnb-skill is a generated command-line wrapper over the CNB code-hosting platform's REST API. It exposes modules for issues, pull requests, git branch-protection settings, user activities, assets and badges. A developer uses it to let an agent read and act on repositories, issues and PRs hosted on CNB (cnb.cool) without writing HTTP calls by hand.
- CLI wrapper over the CNB (cnb.cool / api.cnb-dev.woa.com) code-hosting REST API
- Modules for issues, pull requests, branch protection, activities, assets and badges
- Generated from the CNB swagger.json spec, invoked as `cnb <module> <tool>` with --path/--query/--data JSON args
Cnb Skill by the numbers
- 8 all-time installs (skills.sh)
- Ranked #443 of 735 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Jul 30, 2026 (Skillselion catalog sync)
cnb-skill capabilities & compatibility
- Capabilities
- pull request review · issue triage · git operations
- Works with
- github · gitlab
- Use cases
- code review · devops
- Runs
- Runs locally
What cnb-skill says it does
target: 'https://api.cnb-dev.woa.com/swagger.json',
<module> (必须) 模块名称 (例如: issues),可直接配合 --help 查看该模块帮助
npx skills add https://github.com/bighardperson/computer-science-skills-collection --skill cnb-skillAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 8 |
|---|---|
| repo stars | ★ 33 |
| Last updated | April 26, 2026 |
| Repository | bighardperson/computer-science-skills-collection ↗ |
What it does
Let an agent query and act on CNB-hosted issues, pull requests, branch-protection settings and activities from the command line.
When should I use this skill?
an agent needs to read or manage issues, pull requests or branch-protection settings on the CNB code-hosting platform
By the numbers
- 100 bundled script files
Files
module.exports = {
target: 'https://api.cnb-dev.woa.com/swagger.json',
skillsOutputDir: `./skills`,
// skillsDev: true,
skillConfig: {
fetchConfig: {
responseConverter: {
'get@/{repo}/-/issues/{number}': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
data.body = handler(data.body, fetchOriginParams.path.repo);
return data
}
},
'get@/{repo}/-/issues/{number}/comments/{comment_id}': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
data.body = handler(data.body, fetchOriginParams.path.repo);
return data
}
},
'get@/{repo}/-/issues/{number}/comments': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
for (let i = 0; i < data.length; i++) {
data[i].body = handler(data[i].body, fetchOriginParams.path.repo);
}
return data
}
},
'get@/{repo}/-/pulls/{number}': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
data.body = handler(data.body, fetchOriginParams.path.repo);
return data
}
},
'get@/{repo}/-/pulls/{number}/comments/{comment_id}': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
data.body = handler(data.body, fetchOriginParams.path.repo);
return data
}
},
'get@/{repo}/-/pulls/{number}/comments': {
converter: 'convert-link',
handler: (handler, fetchOriginParams, data) => {
for (let i = 0; i < data.length; i++) {
data[i].body = handler(data[i].body, fetchOriginParams.path.repo);
}
return data
}
},
}
}
}
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = convertLink;
/**
* 把文本里的相对路径转换为绝对路径
* 与 codebuddy/skills/cnb-text-relative-path-converter/scripts/convertLink.js 逻辑一致
*
* @param {String} text 待转换的文本
* @param {String} repoSlug 仓库路径
* @param {String} branchOrSha 可选,分支或SHA
* @returns {String}
*/
function convertLink(text, repoSlug, branchOrSha) {
// 查询所有代码块的位置
let codeBlockPositions = [];
let index = 0;
while (index !== -1) {
const nextIndex = text.indexOf('```', index);
if (nextIndex === -1) break;
codeBlockPositions.push(nextIndex);
index = nextIndex + 3; // 跳过已匹配的三个反引号
}
if (codeBlockPositions.length % 2 !== 0) {
codeBlockPositions = codeBlockPositions.slice(0, codeBlockPositions.length - 1);
}
// 查询所有行内代码块的位置
let inlineCodeBlockPositions = [];
index = 0;
while (index < text.length) {
const nextIndex = text.indexOf('`', index);
if (nextIndex === -1) break;
// 检查是否是单独的反引号(不是代码块的一部分)
if ((nextIndex === 0 || text.charAt(nextIndex - 1) !== '`') && (nextIndex === text.length - 1 || text.charAt(nextIndex + 1) !== '`')) {
inlineCodeBlockPositions.push(nextIndex);
}
index = nextIndex + 1;
}
if (inlineCodeBlockPositions.length % 2 !== 0) {
inlineCodeBlockPositions = inlineCodeBlockPositions.slice(0, inlineCodeBlockPositions.length - 1);
}
// 整理起始和结束位置
const excludedRanges = [...codeBlockPositions, ...inlineCodeBlockPositions].reduce((result, item, index) => {
if (index % 2 === 0) {
return result.concat([[item]]);
}
result[result.length - 1].push(item);
return result;
}, []);
// Helper function to check if an index is within excluded ranges
const isInExcludedRange = index => {
return excludedRanges.some(([start, end]) => index >= start && index < end);
};
let match;
// Collect all replacements with their positions
const replacements = [];
// Match markdown links and images: [text](url) and 
const markdownLinkRegex = /!?\[([^\]]+)\]\(([^)]+)\)/g;
while ((match = markdownLinkRegex.exec(text)) !== null) {
if (!isInExcludedRange(match.index)) {
// Calculate URL position: match.index + length of "![" + match[1] + "]("
const prefixLength = (match[0].startsWith('!') ? 1 : 0) + 1 + match[1].length + 2;
const urlStart = match.index + prefixLength;
const urlEnd = urlStart + match[2].length;
const newUrl = normaliseLink(match[2], repoSlug, branchOrSha);
if (newUrl !== match[2]) {
replacements.push({
start: urlStart,
end: urlEnd,
newUrl
});
}
}
}
// Match HTML tags: <img src="..."> and <a href="...">
const htmlTagRegex = /\s(src|href)=["']([^"']+)["']/gi;
while ((match = htmlTagRegex.exec(text)) !== null) {
if (!isInExcludedRange(match.index)) {
const urlStart = match.index + match[0].indexOf(match[2]);
const urlEnd = urlStart + match[2].length;
const newUrl = normaliseLink(match[2], repoSlug, branchOrSha);
if (newUrl !== match[2]) {
replacements.push({
start: urlStart,
end: urlEnd,
newUrl
});
}
}
}
// Sort replacements by start position in descending order
replacements.sort((a, b) => b.start - a.start);
// Apply replacements from end to start to maintain correct indices
let result = text;
for (const {
start,
end,
newUrl
} of replacements) {
result = result.substring(0, start) + newUrl + result.substring(end);
}
return result;
}
/**
* 相对路径转换为绝对路径
* 与 codebuddy/skills/cnb-text-relative-path-converter/scripts/convertLink.js 逻辑一致
*
* @param {String} link 待转换的链接
* @param {String} repoSlug 仓库路径
* @param {String} branchOrSha 分支或SHA,默认为 HEAD
* @returns {String}
*/
function normaliseLink(link, repoSlug, branchOrSha = 'HEAD') {
const baseURL = `${process.env.CNB_WEB_ENDPOINT}/${repoSlug}`;
if (link.startsWith('/-/')) {
return `${baseURL}${link}`;
}
if (link.indexOf('/-/') === -1 && (link.startsWith('../') || link.startsWith('./') || link.startsWith('/') && !link.startsWith('//'))) {
let chunks = link.split('/');
// 过滤掉空字符串和 . .. 这些无效路径
chunks = chunks.filter(chunk => !!chunk && chunk !== '.' && chunk !== '..');
if (chunks.length === 0) {
return link;
}
chunks.unshift(branchOrSha);
return `${baseURL}/-/git/raw/${chunks.join('/')}`;
}
return link;
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _fs = _interopRequireDefault(require("fs"));
var _path = _interopRequireDefault(require("path"));
var _os = _interopRequireDefault(require("os"));
var _fetchResponseHandler = require("./fetch-response-handler");
var _generateUniqueId = require("./utils/generate-unique-id");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
async function formatResponse(data, response) {
const responseData = {
status: response.status,
trace: response.headers.get('traceparent'),
header: {
'x-cnb-page': response.headers.get('x-cnb-page'),
'x-cnb-page-size': response.headers.get('x-cnb-page-size'),
'x-cnb-total': response.headers.get('x-cnb-total')
},
data: null
};
const contentType = response.headers.get('content-type') || '';
const isJson = ['application/vnd.cnb.api+json', 'application/json', 'text/json'].some(t => contentType.includes(t));
const isText = contentType.startsWith('text/') || contentType.includes('xml');
const isImage = contentType.startsWith('image/');
try {
if (isJson) {
responseData.data = await response.json();
} else if (isText) {
responseData.data = await response.text();
} else if (isImage) {
const arrayBuffer = await response.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
// 确定文件扩展名
let extension = '.bin';
if (contentType.includes('png')) extension = '.png';else if (contentType.includes('jpeg') || contentType.includes('jpg')) extension = '.jpg';else if (contentType.includes('gif')) extension = '.gif';else if (contentType.includes('webp')) extension = '.webp';else if (contentType.includes('svg')) extension = '.svg';
// 可以根据需要添加更多类型
// 构建本地保存路径
// 注意:请确保 './downloads' 目录存在,或者使用 fs.mkdirSync 创建它
const tempDir = _os.default.tmpdir();
const uploadDir = _path.default.join(tempDir, 'cnb-skill');
if (!_fs.default.existsSync(uploadDir)) {
_fs.default.mkdirSync(uploadDir, {
recursive: true
});
}
const fileName = `${(0, _generateUniqueId.generateUniqueId)()}${extension}`;
const filePath = _path.default.join(uploadDir, fileName);
_fs.default.writeFileSync(filePath, buffer);
responseData.data = filePath;
} else {
// 其他二进制数据保持原有的 Base64 逻辑,或者也可以按需保存
const arrayBuffer = await response.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
const base64String = buffer.toString('base64');
responseData.data = {
type: 'base64',
data: base64String,
mimeType: contentType || 'application/octet-stream'
};
}
} catch (err) {
responseData.data = err?.message || 'Unknown Error';
}
if (responseData.status >= 200 && responseData.status < 300) {
return await (0, _fetchResponseHandler.fetchResponseHandler)(data._originParams, responseData);
}
return responseData;
}
async function clientFetch(data) {
const domain = process.env.CNB_API_ENDPOINT || 'https://api.cnb.cool';
const url = `${domain}${data.url}`;
const urlParse = new URL(url);
if (data.params) {
// eslint-disable-next-line no-restricted-syntax
for (const key in data.params) {
urlParse.searchParams.append(key, data.params[key]);
}
}
const response = await fetch(urlParse.href, {
method: data.method.toUpperCase(),
body: data.data ? JSON.stringify(data.data) : undefined,
headers: {
Authorization: `Bearer ${process.env.CNB_TOKEN}`,
Accept: 'application/vnd.cnb.api+json',
...(data?.header || {})
}
});
return await formatResponse(data, response);
}
var _default = exports.default = {
request: clientFetch
};"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fetchResponseHandler = fetchResponseHandler;
async function fetchResponseHandler(fetchOriginParams, response) {
const config = require('./config/cag.config.js');
const responseConverter = config?.skillConfig?.fetchConfig?.responseConverter;
if (!responseConverter) {
return response;
}
const {
method,
_apiTag
} = fetchOriginParams;
const requestTag = `${method}@${_apiTag}`;
const convertConfig = responseConverter[requestTag];
if (convertConfig) {
const {
converter,
handler
} = convertConfig;
try {
const converterExample = require(`./utils/${converter}`).default;
if (converterExample && typeof converterExample === 'function') {
return handler(converterExample, fetchOriginParams, response.data);
}
} catch (e) {
console.error(`converter ${converter} not found`);
}
}
return response;
}#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseArguments = parseArguments;
var _fs = _interopRequireDefault(require("fs"));
var _path = _interopRequireDefault(require("path"));
var _modules = require("./modules.help");
var _tools = require("./tools.help");
var _util = _interopRequireDefault(require("util"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const helpFileContent = _fs.default.readFileSync(_path.default.join(__dirname, 'help.json'), 'utf8');
if (!helpFileContent) {
console.error('help.json not found');
process.exit(1);
}
const helpData = JSON.parse(helpFileContent);
/**
* 解析命令行参数
* @returns 解析后的参数对象
*/
// function parseArguments(): Record<string, string | boolean | undefined> {
// const args = process.argv.slice(2);
// const result: Record<string, string | boolean | undefined> = {};
// for (let i = 0; i < args.length; i++) {
// const arg = args[i];
// // 检查是否是参数名(以--开头)
// if (arg.startsWith('--')) {
// const paramName = arg.slice(2);
// // 检查下一个参数是否是值(不是以--开头)
// if (i + 1 < args.length && !args[i + 1].startsWith('--')) {
// result[paramName] = args[i + 1];
// i++; // 跳过下一个参数(值)
// } else {
// result[paramName] = paramName === 'help' ? true : undefined;
// }
// }
// }
// return result;
// }
function parseArguments() {
const args = process.argv.slice(2);
const result = {};
let positionalCount = 0;
let i = 0;
while (i < args.length) {
const arg = args[i];
if (arg.startsWith('--')) {
// --- 处理命名参数 (Options) ---
const fullKey = arg.slice(2);
// 支持 key=value 格式 (e.g., --config=file.json)
if (fullKey.includes('=')) {
const [key, ...valueParts] = fullKey.split('=');
result[key] = valueParts.join('=');
i++;
continue;
}
const key = fullKey;
// 检查下一个参数是否是值
const nextArg = args[i + 1];
const isNextArgValue = i + 1 < args.length && !nextArg.startsWith('--') && !nextArg.startsWith('-'); // 也防止捕获短参数作为值
if (isNextArgValue) {
result[key] = nextArg;
i += 2; // 跳过 key 和 value
} else {
// 没有值,视为布尔标志 (flag)
// 特殊处理:如果用户显式想要 undefined 行为,可以在这里调整,但通常 CLI 中 flag 存在即为 true
result[key] = true;
i++;
}
} else if (arg.startsWith('-') && arg.length > 1 && !/^-?\d+$/.test(arg)) {
// --- 处理短参数 (Short flags, e.g., -h, -v) ---
// 注意:排除负数数字的情况
const key = arg.slice(1);
// 简单处理:短参数通常不带长值,或者支持 -f value
const nextArg = args[i + 1];
const isNextArgValue = i + 1 < args.length && !nextArg.startsWith('--') && !nextArg.startsWith('-');
if (isNextArgValue && key.length === 1) {
// 只有单字符短参才自动吞并下一个值 (如 -o output.txt),多字符连写 (如 -abc) 通常视为多个布尔旗标
result[key] = nextArg;
i += 2;
} else {
result[key] = true;
i++;
}
} else {
// --- 处理位置参数 (Positional Args) ---
if (positionalCount === 0) {
result.module = arg;
} else if (positionalCount === 1) {
result.tool = arg;
}
positionalCount++;
i++;
}
}
return result;
}
/**
* 验证必须参数是否存在
* @param params 解析后的参数对象
* @returns 验证结果
*/
function validateRequiredParams(params) {
if (!params.tool || params.help) {
return false;
}
return true;
}
/**
* 尝试解析JSON字符串
* @param str 要解析的字符串
* @returns 解析后的对象或原始字符串
*/
function tryParseJSON(str) {
if (typeof str !== 'string') return str;
// 先将真实控制字符转义为 JSON 合法形式,处理 shell/AI 传入的原始换行等情况
const escaped = str.replace(/[\x00-\x1F\x7F]/g, ch => {
const map = {
'\n': '\\n',
'\r': '\\r',
'\t': '\\t',
'\b': '\\b',
'\f': '\\f'
};
return map[ch] || '\\u' + ch.charCodeAt(0).toString(16).padStart(4, '0');
});
try {
return JSON.parse(escaped);
} catch (error) {
return str;
}
}
/**
* 格式化参数对象
* @param params 原始参数对象
* @returns 格式化后的参数对象
*/
function formatParams(params) {
const formatted = {};
// 处理每个参数
for (const [key, value] of Object.entries(params)) {
if (typeof value === 'string') {
formatted[key] = tryParseJSON(value);
} else if (typeof value === 'boolean') {
formatted[key] = value;
}
}
// 当没有传递query时,要判断当前tool是否支持query
if (!formatted.query) {
const {
module,
tool
} = formatted;
const toolsHelp = helpData.modulesHelp[module][tool];
const toolsParam = toolsHelp?.help?.parameter || {};
if (toolsParam.query) {
formatted.query = {};
}
}
return formatted;
}
/**
* 显示帮助文档
* @param moduleName 模块名称,如果指定则显示模块帮助
*/
function showHelp(moduleName, tool) {
if (moduleName && tool) {
(0, _tools.showToolHelp)(helpData, moduleName, tool);
} else if (moduleName) {
(0, _modules.showModuleHelp)(helpData, moduleName);
} else {
let moduleListMsg = ``;
for (const [module, count] of Object.entries(helpData.mainHelp)) {
moduleListMsg += `- ${module}, tool数量(${count})\n `;
}
const helpMeg = `
CNB OpenAPI CLI 工具\n
可用模块:
${moduleListMsg}
参数说明:
<module> (必须) 模块名称 (例如: issues),可直接配合 --help 查看该模块帮助
<tool> (必须) 工具/动作名称 (例如: list-issues)
--path (可选) 路径参数,JSON字符串
--query (可选) 查询参数,JSON字符串
--data (可选) 数据参数,JSON字符串
--help (可选) 显示此帮助文档
使用示例:
${"cnb"} --help
${"cnb"} issues --help
${"cnb"} issues list-issues --help
${"cnb"} issues list-issues --path '{"repo": "my-project"}' --query '{"page": 1, "pageSize": 10}'
`;
console.log(helpMeg);
}
}
/**
* 主函数
*/
async function main() {
// 解析命令行参数
const params = parseArguments();
// 验证必须参数(当没有请求帮助时)
if (!validateRequiredParams(params)) {
showHelp(params.module, params.tool);
process.exit(0);
}
// 格式化参数
const formattedParams = formatParams(params);
// 动态引入模块
const toolPath = _path.default.join(__dirname, '../modules', `${formattedParams.module}/${formattedParams.tool}.js`);
if (!_fs.default.existsSync(toolPath)) {
console.error(`工具文件不存在: ${toolPath}`);
process.exit(1);
}
const toolModule = require(toolPath);
const toolFunction = toolModule.default;
if (!toolFunction) {
console.error(`工具函数不存在`);
process.exit(1);
}
const toolsParam = [];
let pathAndQueryParams = null;
if (formattedParams.path && Object.keys(formattedParams.path).length === 1 && !formattedParams.query) {
pathAndQueryParams = formattedParams.path[Object.keys(formattedParams.path)[0]];
} else {
if (formattedParams.path) {
pathAndQueryParams = {
...formattedParams.path
};
}
if (formattedParams.query) {
pathAndQueryParams = {
...pathAndQueryParams,
...formattedParams.query
};
}
}
if (pathAndQueryParams) {
toolsParam.push(pathAndQueryParams);
}
if (formattedParams.data) {
toolsParam.push(formattedParams.data);
}
const data = await toolFunction(...toolsParam);
console.log(_util.default.inspect(data, {
showHidden: false,
depth: null
}));
}
main();"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.showModuleHelp = showModuleHelp;
/**
* 显示模块帮助文档
* @param helpData 帮助数据
* @param moduleName 模块名称
*/
function showModuleHelp(helpData, moduleName) {
const moduleHelpData = helpData.modulesHelp[moduleName];
if (!moduleHelpData) {
console.error(`模块 ${moduleName} 不存在`);
process.exit(1);
}
let toolListMsg = ``;
for (const [tool, info] of Object.entries(moduleHelpData)) {
toolListMsg += `- ${info.filename}, ${info.summary}\n `;
}
const helpMeg = `
模块${moduleName}帮助文档\n
可用工具:
${toolListMsg}
参数说明:
<module> (必须) 模块名称 (例如: issues),可直接配合 --help 查看该模块帮助
<tool> (必须) 工具/动作名称 (例如: list-issues)
--path (可选) 路径参数,JSON字符串
--query (可选) 查询参数,JSON字符串
--data (可选) 数据参数,JSON字符串
--help (可选) 显示此帮助文档
使用示例:
${"cnb"} issues --help
${"cnb"} issues list-issues --help
${"cnb"} issues list-issues --path '{"repo": "my-project"}' --query '{"page": 1, "pageSize": 10}'
`;
console.log(helpMeg);
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.schemaToJson = schemaToJson;
function schemaToJson(schema, json) {
if (schema.type === 'object' || schema.type === 'array') {
const props = schema.type === 'object' ? schema.properties : schema.items.properties;
// eslint-disable-next-line no-restricted-syntax
for (const key in props) {
const {
type,
items
} = props[key];
if (type === 'object') {
json[key] = schemaToJson(props[key], {});
} else if (type === 'array') {
if (items.properties) {
json[key] = [schemaToJson(props[key], {})];
} else {
json[key] = [items.type];
}
} else {
json[key] = type;
}
}
} else {
return schema.type;
}
return json;
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.showToolHelp = showToolHelp;
var _util = _interopRequireDefault(require("util"));
var _schemaToJson = require("./schemaToJson");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
* 显示工具帮助文档
* @param helpData 帮助数据
* @param moduleName 模块名称
* @param tool 工具名称
*/
function showToolHelp(helpData, moduleName, tool) {
const toolHelpData = helpData.modulesHelp[moduleName][tool];
if (!toolHelpData) {
console.error(`工具 ${tool} 不存在`);
process.exit(1);
}
const {
summary,
description,
help
} = toolHelpData;
const {
parameter
} = help;
const {
path,
query,
body
} = parameter;
// path参数说明
let pathMsg = '';
const pathParamsExample = {};
if (path) {
pathMsg = `--path参数详细说明:
${Object.keys(path).map(key => {
if (path[key].required) {
pathParamsExample[key] = `<${path[key].type}>`;
}
return ` - ${key} (${path[key].type}) - ${path[key].description}(${path[key].required ? '必填' : '选填'})`;
}).join('\n')}
`;
}
// query参数说明
let queryMsg = '';
const queryParamsExample = {};
if (query) {
queryMsg = `--query详细参数:
${Object.keys(query).map(key => {
if (query[key].required) {
queryParamsExample[key] = `<${query[key].type}>`;
} else if (query[key].default !== undefined) {
queryParamsExample[key] = query[key].default;
}
return ` - ${key} (${query[key].type}) - ${query[key].description}(${query[key].required ? '必填' : '选填'})${query[key].enum ? `, [枚举: ${query[key].enum.join(', ')}]` : ''}`;
}).join('\n')}
`;
}
// data参数说明
let bodyMsg = '';
let bodyParamsExample = {};
if (body) {
const {
type,
description,
required,
schema
} = body;
if (schema) {
bodyParamsExample = (0, _schemaToJson.schemaToJson)(schema, {});
bodyMsg = `--data参数详细说明:
${_util.default.inspect(schema, {
showHidden: false,
depth: null
})}`;
} else {
bodyMsg = `--data参数详细说明:
- ${type} - ${description}(${required ? '必填' : '选填'})
`;
}
}
const exampleMsg = [`node ./skills/scripts/core ${moduleName} ${tool}`];
if (Object.keys(pathParamsExample).length > 0) {
exampleMsg.push(`--path '${JSON.stringify(pathParamsExample)}'`);
}
if (Object.keys(queryParamsExample).length > 0) {
exampleMsg.push(`--query '${JSON.stringify(queryParamsExample)}'`);
}
if (Object.keys(bodyParamsExample).length > 0) {
exampleMsg.push(`--data '${JSON.stringify(bodyParamsExample)}'`);
}
const helpMeg = `
工具${tool}帮助文档\n
工具说明:
1. ${summary}
2. ${description}
\n参数说明:
<module> (必须) 模块名称 (例如: issues),可直接配合 --help 查看该模块帮助
<tool> (必须) 工具/动作名称 (例如: list-issues)
--path (可选) 路径参数,JSON字符串
--query (可选) 查询参数,JSON字符串
--data (可选) 数据参数,JSON字符串
--help (可选) 显示此帮助文档
${pathMsg && `\n${pathMsg}`}${queryMsg && `\n${queryMsg}`}${bodyMsg && `\n${bodyMsg}`}
\n使用示例:
${exampleMsg.join(' ')}
`;
console.log(helpMeg);
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = convertLink;
/**
* 把文本里的相对路径转换为绝对路径
* 与 src/helpers/convertLink.ts 逻辑一致
*
* @param {String} text 待转换的文本
* @param {String} repoSlug 仓库路径
* @param {String} branchOrSha 可选,分支或SHA
* @returns {String}
*/
function convertLink(text, repoSlug, branchOrSha) {
// 查询所有代码块的位置
let codeBlockPositions = [];
let index = 0;
while (index !== -1) {
const nextIndex = text.indexOf('```', index);
if (nextIndex === -1) break;
codeBlockPositions.push(nextIndex);
index = nextIndex + 3; // 跳过已匹配的三个反引号
}
if (codeBlockPositions.length % 2 !== 0) {
codeBlockPositions = codeBlockPositions.slice(0, codeBlockPositions.length - 1);
}
// 查询所有行内代码块的位置
let inlineCodeBlockPositions = [];
index = 0;
while (index < text.length) {
const nextIndex = text.indexOf('`', index);
if (nextIndex === -1) break;
// 检查是否是单独的反引号(不是代码块的一部分)
if ((nextIndex === 0 || text.charAt(nextIndex - 1) !== '`') && (nextIndex === text.length - 1 || text.charAt(nextIndex + 1) !== '`')) {
inlineCodeBlockPositions.push(nextIndex);
}
index = nextIndex + 1;
}
if (inlineCodeBlockPositions.length % 2 !== 0) {
inlineCodeBlockPositions = inlineCodeBlockPositions.slice(0, inlineCodeBlockPositions.length - 1);
}
// 整理起始和结束位置
const excludedRanges = [...codeBlockPositions, ...inlineCodeBlockPositions].reduce((result, item, index) => {
if (index % 2 === 0) {
return result.concat([[item]]);
} else {
result[result.length - 1].push(item);
return result;
}
}, []);
// Helper function to check if an index is within excluded ranges
const isInExcludedRange = index => {
return excludedRanges.some(([start, end]) => index >= start && index < end);
};
let match;
// Collect all replacements with their positions
const replacements = [];
// Match markdown links and images: [alt](url), [](url),  and 
const markdownLinkRegex = /!?\[([^\]]*)\]\(([^)]+)\)/g;
while ((match = markdownLinkRegex.exec(text)) !== null) {
if (!isInExcludedRange(match.index)) {
// Calculate URL position: match.index + length of "![" + match[1] + "]("
const prefixLength = (match[0].startsWith('!') ? 1 : 0) + 1 + match[1].length + 2;
const urlStart = match.index + prefixLength;
const urlEnd = urlStart + match[2].length;
const newUrl = normaliseLink(match[2], repoSlug, branchOrSha);
if (newUrl !== match[2]) {
replacements.push({
start: urlStart,
end: urlEnd,
newUrl
});
}
}
}
// Match HTML tags: <img src="..."> and <a href="...">
const htmlTagRegex = /\s(src|href)=["']([^"']+)["']/gi;
while ((match = htmlTagRegex.exec(text)) !== null) {
if (!isInExcludedRange(match.index)) {
const urlStart = match.index + match[0].indexOf(match[2]);
const urlEnd = urlStart + match[2].length;
const newUrl = normaliseLink(match[2], repoSlug, branchOrSha);
if (newUrl !== match[2]) {
replacements.push({
start: urlStart,
end: urlEnd,
newUrl
});
}
}
}
// Sort replacements by start position in descending order
replacements.sort((a, b) => b.start - a.start);
// Apply replacements from end to start to maintain correct indices
let result = text;
for (const {
start,
end,
newUrl
} of replacements) {
result = result.substring(0, start) + newUrl + result.substring(end);
}
return result;
}
/**
* 相对路径转换为绝对路径
* 与 src/helpers/convertLink.ts 逻辑一致
*
* @param {String} link 待转换的链接
* @param {String} repoSlug 仓库路径
* @param {String} branchOrSha 分支或SHA,默认为 HEAD
* @returns {String}
*/
function normaliseLink(link, repoSlug, branchOrSha = 'HEAD') {
const {
CNB_WEB_ENDPOINT
} = process.env;
const baseURL = `${CNB_WEB_ENDPOINT}/${repoSlug}`;
if (link.startsWith('/-/')) {
return `${baseURL}${link}`;
}
if (link.indexOf('/-/') === -1 && (link.startsWith('../') || link.startsWith('./') || link.startsWith('/') && !link.startsWith('//'))) {
let chunks = link.split('/');
// 过滤掉空字符串和 . .. 这些无效路径
chunks = chunks.filter(chunk => !!chunk && chunk !== '.' && chunk !== '..');
if (chunks.length === 0) {
return link;
}
chunks.unshift(branchOrSha);
return `${baseURL}/-/git/raw/${chunks.join('/')}`;
}
return link;
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.generateUniqueId = generateUniqueId;
function generateUniqueId() {
return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
}
;"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /users/{username}/activities
*/
/**
* @description getUserActivitiesByDate request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetUserActivitiesByDateRes Success Response Type
*/
/**
* @description GetUserActivitiesByDateError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* account-engage:r
* @tags Activities
* @name getUserActivitiesByDate
* @summary 获取个人动态活跃详情汇总。Get user activities by date.
* @request get:/users/{username}/activities
----------------------------------
* @param {GetUserActivitiesByDateParams} arg0 - getUserActivitiesByDate request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
username,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/users/${username}/activities`,
_apiTag: "/users/{username}/activities",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/users/{username}/activities",
path: {
username
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /users/{username}/repo-activities/{activityType}
*/
/**
* @description getUserRepoActivityDetails request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetUserRepoActivityDetailsRes Success Response Type
*/
/**
* @description GetUserRepoActivityDetailsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* account-engage:r
* @tags Activities
* @name getUserRepoActivityDetails
* @summary 个人仓库动态详情列表。List of personal repository activity details.
* @request get:/users/{username}/repo-activities/{activityType}
----------------------------------
* @param {GetUserRepoActivityDetailsParams} arg0 - getUserRepoActivityDetails request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
username,
activityType,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/users/${username}/repo-activities/${activityType}`,
_apiTag: "/users/{username}/repo-activities/{activityType}",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/users/{username}/repo-activities/{activityType}",
path: {
username,
activityType
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/top-activity-users
*/
/**
* @description topContributors request params
*/
/**
* @description Other reuqest params
*/
/**
* @description TopContributorsRes Success Response Type
*/
/**
* @description TopContributorsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-base-info:r
* @tags Activities
* @name topContributors
* @summary 获取仓库 top 活跃用户。List the top active users
* @request get:/{repo}/-/top-activity-users
----------------------------------
* @param {TopContributorsParams} arg0 - topContributors request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/top-activity-users`,
_apiTag: "/{repo}/-/top-activity-users",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/{repo}/-/top-activity-users",
path: {
repo
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.1.8
* @Source /{repo}/-/build/ai/auto-pr
*/
/**
* @description Other reuqest params
*/
/**
* @description AiAutoPrRes Success Response Type
*/
/**
* @description AiAutoPrError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags AI
* @name aiAutoPr
* @summary 根据传入的需求内容和需求标题借助 AI 自动编码并提 PR。Automatically code and create a PR with AI based on the input requirement content and title.
* @request post:/{repo}/-/build/ai/auto-pr
----------------------------------
* @param {string} arg0
* @param {DtoAiAutoPrReq} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, request, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/build/ai/auto-pr`,
_apiTag: "/{repo}/-/build/ai/auto-pr",
method: "post",
data: request,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/build/ai/auto-pr",
path: {
repo
},
body: request
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/ai/chat/completions
*/
/**
* @description Other reuqest params
*/
/**
* @description AiChatCompletionsRes Success Response Type
*/
/**
* @description AiChatCompletionsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags AI
* @name aiChatCompletions
* @summary AI 对话。调用者需有代码写权限(CNB_TOKEN 仅需读权限,部署令牌不检查读写权限)。AI chat completions. Requires caller to have repo write permission.
* @request post:/{repo}/-/ai/chat/completions
----------------------------------
* @param {string} arg0
* @param {DtoAiChatCompletionsReq} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, request, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/ai/chat/completions`,
_apiTag: "/{repo}/-/ai/chat/completions",
method: "post",
data: request,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/ai/chat/completions",
path: {
repo
},
body: request
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/assets/{assetID}
*/
/**
* @description deleteAsset request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteAssetRes Success Response Type
*/
/**
* @description DeleteAssetError Error Response Type
*/
/**
* @description 通过 asset 记录 id 删除一个 asset,release和commit附件不能通过该接口删除
* 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags Assets
* @name deleteAsset
* @summary 通过 asset 记录 id 删除一个 asset
* @request delete:/{repo}/-/assets/{assetID}
----------------------------------
* @param {DeleteAssetParams} arg0 - deleteAsset request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
assetID
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/assets/${assetID}`,
_apiTag: "/{repo}/-/assets/{assetID}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/assets/{assetID}",
path: {
repo,
assetID
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/files/{filePath}
*/
/**
* @description getFiles request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetFilesRes Success Response Type
*/
/**
* @description GetFilesError Error Response Type
*/
/**
* @description 注意:后续版本该接口可能将被移出 Assets 分类
* 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-contents:r
* @tags Assets,Pulls,Issues
* @name getFiles
* @summary 获取 issue 文件或合并请求文件的请求,返回文件二进制内容。Request to retrieve file of issues and pull requests, returns binary content.
* @request get:/{repo}/-/files/{filePath}
----------------------------------
* @param {GetFilesParams} arg0 - getFiles request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
filePath
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/files/${filePath}`,
_apiTag: "/{repo}/-/files/{filePath}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/files/{filePath}",
path: {
repo,
filePath
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/imgs/{imgPath}
*/
/**
* @description getImgs request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetImgsRes Success Response Type
*/
/**
* @description GetImgsError Error Response Type
*/
/**
* @description 注意:后续版本该接口可能将被移出 Assets 分类
* 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-contents:r
* @tags Assets,Pulls,Issues
* @name getImgs
* @summary 获取 issue 图片或合并请求图片的请求,返回图片二进制内容。Request to retrieve image of issues and pull requests, returns binary content.
* @request get:/{repo}/-/imgs/{imgPath}
----------------------------------
* @param {GetImgsParams} arg0 - getImgs request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
imgPath
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/imgs/${imgPath}`,
_apiTag: "/{repo}/-/imgs/{imgPath}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/imgs/{imgPath}",
path: {
repo,
imgPath
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{slug}/-/list-assets
*/
/**
* @description listAssets request params
*/
/**
* @description Other reuqest params
*/
/**
* @description ListAssetsRes Success Response Type
*/
/**
* @description ListAssetsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags Assets
* @name listAssets
* @summary 仓库的 asset 记录列表
* @request get:/{slug}/-/list-assets
----------------------------------
* @param {ListAssetsParams} arg0 - listAssets request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
slug,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${slug}/-/list-assets`,
_apiTag: "/{slug}/-/list-assets",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/{slug}/-/list-assets",
path: {
slug
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/badge/git/{sha}/{badge}
*/
/**
* @description getBadge request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetBadgeRes Success Response Type
*/
/**
* @description GetBadgeError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-commit-status:r
* @tags Badge
* @name getBadge
* @summary 获取徽章 svg 或 JSON 数据。Get badge svg or JSON data.
* @request get:/{repo}/-/badge/git/{sha}/{badge}
----------------------------------
* @param {GetBadgeParams} arg0 - getBadge request params
* @param {DtoGetBadgeReq} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default({
repo,
sha,
badge
}, request, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/badge/git/${sha}/${badge}`,
_apiTag: "/{repo}/-/badge/git/{sha}/{badge}",
method: "get",
data: request,
_originParams: {
method: "get",
_apiTag: "/{repo}/-/badge/git/{sha}/{badge}",
path: {
repo,
sha,
badge
},
body: request
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/badge/list
*/
/**
* @description Other reuqest params
*/
/**
* @description ListBadgeRes Success Response Type
*/
/**
* @description ListBadgeError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-commit-status:r
* @tags Badge
* @name listBadge
* @summary 获取徽章列表数据。List badge data
* @request get:/{repo}/-/badge/list
----------------------------------
* @param {string} arg0
* @param {DtoListBadgeReq} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, request, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/badge/list`,
_apiTag: "/{repo}/-/badge/list",
method: "get",
data: request,
_originParams: {
method: "get",
_apiTag: "/{repo}/-/badge/list",
path: {
repo
},
body: request
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/badge/upload
*/
/**
* @description Other reuqest params
*/
/**
* @description UploadBadgeRes Success Response Type
*/
/**
* @description UploadBadgeError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-commit-status:rw
* @tags Badge
* @name uploadBadge
* @summary 上传徽章数据。Upload badge data
* @request post:/{repo}/-/badge/upload
----------------------------------
* @param {string} arg0
* @param {DtoUploadBadgeReq} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, request, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/badge/upload`,
_apiTag: "/{repo}/-/badge/upload",
method: "post",
data: request,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/badge/upload",
path: {
repo
},
body: request
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{slug}/-/charge/special-amount
*/
/**
* @description Other reuqest params
*/
/**
* @description GetSpecialAmountRes Success Response Type
*/
/**
* @description GetSpecialAmountError Error Response Type
*/
/**
* @description 查看根组织的特权额度,需要根组织的 master 以上权限才可以查看
* 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* group-resource:r
* @tags Charge
* @name getSpecialAmount
* @summary 查看特权额度
* @request get:/{slug}/-/charge/special-amount
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(slug, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${slug}/-/charge/special-amount`,
_apiTag: "/{slug}/-/charge/special-amount",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{slug}/-/charge/special-amount",
path: {
slug
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /events/{repo}/-/{date}
*/
/**
* @description getEvents request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetEventsRes Success Response Type
*/
/**
* @description GetEventsError Error Response Type
*/
/**
* @description No description
* @tags Event
* @name getEvents
* @summary 获取仓库动态预签名地址,并返回内容。Get events pre-signed URL and return content.
* @request get:/events/{repo}/-/{date}
----------------------------------
* @param {GetEventsParams} arg0 - getEvents request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
date
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/events/${repo}/-/${date}`,
_apiTag: "/events/{repo}/-/{date}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/events/{repo}/-/{date}",
path: {
repo,
date
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /users/{username}/followers
*/
/**
* @description getFollowersByUserID request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetFollowersByUserIDRes Success Response Type
*/
/**
* @description GetFollowersByUserIDError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* account-engage:r
* @tags Followers
* @name getFollowersByUserID
* @summary 获取指定用户的粉丝列表。Get the followers list of specified user.
* @request get:/users/{username}/followers
----------------------------------
* @param {GetFollowersByUserIDParams} arg0 - getFollowersByUserID request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
username,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/users/${username}/followers`,
_apiTag: "/users/{username}/followers",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/users/{username}/followers",
path: {
username
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /users/{username}/following
*/
/**
* @description getFollowingByUserID request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetFollowingByUserIDRes Success Response Type
*/
/**
* @description GetFollowingByUserIDError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* account-engage:r
* @tags Followers
* @name getFollowingByUserID
* @summary 获取指定用户的关注人列表。Get the list of users that the specified user is following.
* @request get:/users/{username}/following
----------------------------------
* @param {GetFollowingByUserIDParams} arg0 - getFollowingByUserID request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
username,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/users/${username}/following`,
_apiTag: "/users/{username}/following",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/users/{username}/following",
path: {
username
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/branch-protections/{id}
*/
/**
* @description deleteBranchProtection request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteBranchProtectionRes Success Response Type
*/
/**
* @description DeleteBranchProtectionError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name deleteBranchProtection
* @summary 删除仓库保护分支规则。 Delete branch protection rule.
* @request delete:/{repo}/-/settings/branch-protections/{id}
----------------------------------
* @param {DeleteBranchProtectionParams} arg0 - deleteBranchProtection request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
id
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/branch-protections/${id}`,
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
path: {
repo,
id
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/branch-protections/{id}
*/
/**
* @description getBranchProtection request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetBranchProtectionRes Success Response Type
*/
/**
* @description GetBranchProtectionError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags GitSettings
* @name getBranchProtection
* @summary 查询仓库保护分支规则。Get branch protection rule.
* @request get:/{repo}/-/settings/branch-protections/{id}
----------------------------------
* @param {GetBranchProtectionParams} arg0 - getBranchProtection request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
id
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/branch-protections/${id}`,
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
path: {
repo,
id
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/cloud-native-build
*/
/**
* @description Other reuqest params
*/
/**
* @description GetPipelineSettingsRes Success Response Type
*/
/**
* @description GetPipelineSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags GitSettings
* @name getPipelineSettings
* @summary 查询仓库云原生构建设置。List pipeline settings.
* @request get:/{repo}/-/settings/cloud-native-build
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(repo, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/cloud-native-build`,
_apiTag: "/{repo}/-/settings/cloud-native-build",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/settings/cloud-native-build",
path: {
repo
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/pull-request
*/
/**
* @description Other reuqest params
*/
/**
* @description GetPullRequestSettingsRes Success Response Type
*/
/**
* @description GetPullRequestSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags GitSettings
* @name getPullRequestSettings
* @summary 查询仓库合并请求设置。List pull request settings.
* @request get:/{repo}/-/settings/pull-request
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(repo, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/pull-request`,
_apiTag: "/{repo}/-/settings/pull-request",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/settings/pull-request",
path: {
repo
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/push-limit
*/
/**
* @description Other reuqest params
*/
/**
* @description GetPushLimitSettingsRes Success Response Type
*/
/**
* @description GetPushLimitSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags GitSettings
* @name getPushLimitSettings
* @summary 查询仓库推送设置。List push limit settings.
* @request get:/{repo}/-/settings/push-limit
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(repo, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/push-limit`,
_apiTag: "/{repo}/-/settings/push-limit",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/settings/push-limit",
path: {
repo
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/branch-protections
*/
/**
* @description Other reuqest params
*/
/**
* @description ListBranchProtectionsRes Success Response Type
*/
/**
* @description ListBranchProtectionsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:r
* @tags GitSettings
* @name listBranchProtections
* @summary 查询仓库保护分支规则列表。List branch protection rules.
* @request get:/{repo}/-/settings/branch-protections
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(repo, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/branch-protections`,
_apiTag: "/{repo}/-/settings/branch-protections",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/settings/branch-protections",
path: {
repo
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/branch-protections/{id}
*/
/**
* @description patchBranchProtection request params
*/
/**
* @description Other reuqest params
*/
/**
* @description PatchBranchProtectionRes Success Response Type
*/
/**
* @description PatchBranchProtectionError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name patchBranchProtection
* @summary 更新仓库保护分支规则。Update branch protection rule.
* @request patch:/{repo}/-/settings/branch-protections/{id}
----------------------------------
* @param {PatchBranchProtectionParams} arg0 - patchBranchProtection request params
* @param {ApiBranchProtection} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default({
repo,
id
}, branch_protection_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/branch-protections/${id}`,
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
method: "patch",
data: branch_protection_form,
_originParams: {
method: "patch",
_apiTag: "/{repo}/-/settings/branch-protections/{id}",
path: {
repo,
id
},
body: branch_protection_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/branch-protections
*/
/**
* @description Other reuqest params
*/
/**
* @description PostBranchProtectionRes Success Response Type
*/
/**
* @description PostBranchProtectionError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name postBranchProtection
* @summary 新增仓库保护分支规则。Create branch protection rule.
* @request post:/{repo}/-/settings/branch-protections
----------------------------------
* @param {string} arg0
* @param {ApiBranchProtection} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, branch_protection_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/branch-protections`,
_apiTag: "/{repo}/-/settings/branch-protections",
method: "post",
data: branch_protection_form,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/settings/branch-protections",
path: {
repo
},
body: branch_protection_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/cloud-native-build
*/
/**
* @description Other reuqest params
*/
/**
* @description PutPipelineSettingsRes Success Response Type
*/
/**
* @description PutPipelineSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name putPipelineSettings
* @summary 更新仓库云原生构建设置。Update pipeline settings.
* @request put:/{repo}/-/settings/cloud-native-build
----------------------------------
* @param {string} arg0
* @param {ApiPipelineSettings} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, pipeline_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/cloud-native-build`,
_apiTag: "/{repo}/-/settings/cloud-native-build",
method: "put",
data: pipeline_form,
_originParams: {
method: "put",
_apiTag: "/{repo}/-/settings/cloud-native-build",
path: {
repo
},
body: pipeline_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/pull-request
*/
/**
* @description Other reuqest params
*/
/**
* @description PutPullRequestSettingsRes Success Response Type
*/
/**
* @description PutPullRequestSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name putPullRequestSettings
* @summary 更新仓库合并请求设置。Set pull request settings.
* @request put:/{repo}/-/settings/pull-request
----------------------------------
* @param {string} arg0
* @param {ApiPullRequestSettings} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, pull_request_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/pull-request`,
_apiTag: "/{repo}/-/settings/pull-request",
method: "put",
data: pull_request_form,
_originParams: {
method: "put",
_apiTag: "/{repo}/-/settings/pull-request",
path: {
repo
},
body: pull_request_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/settings/push-limit
*/
/**
* @description Other reuqest params
*/
/**
* @description PutPushLimitSettingsRes Success Response Type
*/
/**
* @description PutPushLimitSettingsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-manage:rw
* @tags GitSettings
* @name putPushLimitSettings
* @summary 设置仓库推送设置。Set push limit settings.
* @request put:/{repo}/-/settings/push-limit
----------------------------------
* @param {string} arg0
* @param {ApiPushLimitSettings} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, push_limit_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/settings/push-limit`,
_apiTag: "/{repo}/-/settings/push-limit",
method: "put",
data: push_limit_form,
_originParams: {
method: "put",
_apiTag: "/{repo}/-/settings/push-limit",
path: {
repo
},
body: push_limit_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/blobs
*/
/**
* @description Other reuqest params
*/
/**
* @description CreateBlobRes Success Response Type
*/
/**
* @description CreateBlobError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name createBlob
* @summary 创建一个 blob。Create a blob.
* @request post:/{repo}/-/git/blobs
----------------------------------
* @param {string} arg0
* @param {ApiPostBlobForm} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, post_blob_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/blobs`,
_apiTag: "/{repo}/-/git/blobs",
method: "post",
data: post_blob_form,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/git/blobs",
path: {
repo
},
body: post_blob_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/branch-locks/{branch}
*/
/**
* @description createBranchLock request params
*/
/**
* @description Other reuqest params
*/
/**
* @description CreateBranchLockRes Success Response Type
*/
/**
* @description CreateBranchLockError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name createBranchLock
* @summary 锁定分支
* @request post:/{repo}/-/git/branch-locks/{branch}
----------------------------------
* @param {CreateBranchLockParams} arg0 - createBranchLock request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
branch
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/branch-locks/${branch}`,
_apiTag: "/{repo}/-/git/branch-locks/{branch}",
method: "post",
_originParams: {
method: "post",
_apiTag: "/{repo}/-/git/branch-locks/{branch}",
path: {
repo,
branch
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/branches
*/
/**
* @description Other reuqest params
*/
/**
* @description CreateBranchRes Success Response Type
*/
/**
* @description CreateBranchError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name createBranch
* @summary 创建新分支。Create a new branch based on a start point.
* @request post:/{repo}/-/git/branches
----------------------------------
* @param {string} arg0
* @param {OpenapiCreateBranchForm} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, create_branch_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/branches`,
_apiTag: "/{repo}/-/git/branches",
method: "post",
data: create_branch_form,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/git/branches",
path: {
repo
},
body: create_branch_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/tags
*/
/**
* @description Other reuqest params
*/
/**
* @description CreateTagRes Success Response Type
*/
/**
* @description CreateTagError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name createTag
* @summary 创建一个 tag。Create a tag.
* @request post:/{repo}/-/git/tags
----------------------------------
* @param {string} arg0
* @param {ApiPostTagFrom} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, post_tag_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/tags`,
_apiTag: "/{repo}/-/git/tags",
method: "post",
data: post_tag_form,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/git/tags",
path: {
repo
},
body: post_tag_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/branch-locks/{branch}
*/
/**
* @description deleteBranchLock request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteBranchLockRes Success Response Type
*/
/**
* @description DeleteBranchLockError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name deleteBranchLock
* @summary 解除锁定分支
* @request delete:/{repo}/-/git/branch-locks/{branch}
----------------------------------
* @param {DeleteBranchLockParams} arg0 - deleteBranchLock request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
branch
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/branch-locks/${branch}`,
_apiTag: "/{repo}/-/git/branch-locks/{branch}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/branch-locks/{branch}",
path: {
repo,
branch
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/branches/{branch}
*/
/**
* @description deleteBranch request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteBranchRes Success Response Type
*/
/**
* @description DeleteBranchError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name deleteBranch
* @summary 删除指定分支。Delete the specified branch.
* @request delete:/{repo}/-/git/branches/{branch}
----------------------------------
* @param {DeleteBranchParams} arg0 - deleteBranch request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
branch
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/branches/${branch}`,
_apiTag: "/{repo}/-/git/branches/{branch}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/branches/{branch}",
path: {
repo,
branch
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-annotations/{sha}/{key}
*/
/**
* @description deleteCommitAnnotation request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteCommitAnnotationRes Success Response Type
*/
/**
* @description DeleteCommitAnnotationError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name deleteCommitAnnotation
* @summary 删除指定 commit 的元数据。Delete commit annotation.
* @request delete:/{repo}/-/git/commit-annotations/{sha}/{key}
----------------------------------
* @param {DeleteCommitAnnotationParams} arg0 - deleteCommitAnnotation request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
sha,
key
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-annotations/${sha}/${key}`,
_apiTag: "/{repo}/-/git/commit-annotations/{sha}/{key}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/commit-annotations/{sha}/{key}",
path: {
repo,
sha,
key
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-assets/{sha1}/{asset_id}
*/
/**
* @description deleteCommitAsset request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteCommitAssetRes Success Response Type
*/
/**
* @description DeleteCommitAssetError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:rw
* @tags Git
* @name deleteCommitAsset
* @summary 删除指定 commit 的附件。Delete commit asset.
* @request delete:/{repo}/-/git/commit-assets/{sha1}/{asset_id}
----------------------------------
* @param {DeleteCommitAssetParams} arg0 - deleteCommitAsset request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
sha1,
asset_id
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-assets/${sha1}/${asset_id}`,
_apiTag: "/{repo}/-/git/commit-assets/{sha1}/{asset_id}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/commit-assets/{sha1}/{asset_id}",
path: {
repo,
sha1,
asset_id
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/tag-annotations/{tag_with_key}
*/
/**
* @description deleteTagAnnotation request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteTagAnnotationRes Success Response Type
*/
/**
* @description DeleteTagAnnotationError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-contents:rw
* @tags Git
* @name deleteTagAnnotation
* @summary 删除指定 tag 的元数据。Delete the metadata of the specified tag.
* @request delete:/{repo}/-/git/tag-annotations/{tag_with_key}
----------------------------------
* @param {DeleteTagAnnotationParams} arg0 - deleteTagAnnotation request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
tag_with_key
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/tag-annotations/${tag_with_key}`,
_apiTag: "/{repo}/-/git/tag-annotations/{tag_with_key}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/tag-annotations/{tag_with_key}",
path: {
repo,
tag_with_key
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/tags/{tag}
*/
/**
* @description deleteTag request params
*/
/**
* @description Other reuqest params
*/
/**
* @description DeleteTagRes Success Response Type
*/
/**
* @description DeleteTagError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-contents:rw
* @tags Git
* @name deleteTag
* @summary 删除指定 tag。Delete the specified tag.
* @request delete:/{repo}/-/git/tags/{tag}
----------------------------------
* @param {DeleteTagParams} arg0 - deleteTag request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
tag
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/tags/${tag}`,
_apiTag: "/{repo}/-/git/tags/{tag}",
method: "delete",
_originParams: {
method: "delete",
_apiTag: "/{repo}/-/git/tags/{tag}",
path: {
repo,
tag
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/archive-commit-changed-files/{sha1}
*/
/**
* @description getArchiveCommitChangedFiles request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetArchiveCommitChangedFilesRes Success Response Type
*/
/**
* @description GetArchiveCommitChangedFilesError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getArchiveCommitChangedFiles
* @summary 打包下载 commit 变更文件。Download archive of changed files for a commit.
* @request get:/{repo}/-/git/archive-commit-changed-files/{sha1}
----------------------------------
* @param {GetArchiveCommitChangedFilesParams} arg0 - getArchiveCommitChangedFiles request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
sha1
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/archive-commit-changed-files/${sha1}`,
_apiTag: "/{repo}/-/git/archive-commit-changed-files/{sha1}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/archive-commit-changed-files/{sha1}",
path: {
repo,
sha1
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/archive-compare-changed-files/{base_head}
*/
/**
* @description getArchiveCompareChangedFiles request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetArchiveCompareChangedFilesRes Success Response Type
*/
/**
* @description GetArchiveCompareChangedFilesError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getArchiveCompareChangedFiles
* @summary 打包下载两次 ref 之间的变更文件。Download archive of changed files for a compare.
* @request get:/{repo}/-/git/archive-compare-changed-files/{base_head}
----------------------------------
* @param {GetArchiveCompareChangedFilesParams} arg0 - getArchiveCompareChangedFiles request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
base_head
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/archive-compare-changed-files/${base_head}`,
_apiTag: "/{repo}/-/git/archive-compare-changed-files/{base_head}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/archive-compare-changed-files/{base_head}",
path: {
repo,
base_head
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/archive/{ref_with_path}
*/
/**
* @description getArchive request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetArchiveRes Success Response Type
*/
/**
* @description GetArchiveError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getArchive
* @summary 下载仓库内容
* @request get:/{repo}/-/git/archive/{ref_with_path}
----------------------------------
* @param {GetArchiveParams} arg0 - getArchive request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
ref_with_path
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/archive/${ref_with_path}`,
_apiTag: "/{repo}/-/git/archive/{ref_with_path}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/archive/{ref_with_path}",
path: {
repo,
ref_with_path
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/branches/{branch}
*/
/**
* @description getBranch request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetBranchRes Success Response Type
*/
/**
* @description GetBranchError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getBranch
* @summary 查询指定分支。Get a branch.
* @request get:/{repo}/-/git/branches/{branch}
----------------------------------
* @param {GetBranchParams} arg0 - getBranch request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
branch
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/branches/${branch}`,
_apiTag: "/{repo}/-/git/branches/{branch}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/branches/{branch}",
path: {
repo,
branch
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-annotations-in-batch
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitAnnotationsInBatchRes Success Response Type
*/
/**
* @description GetCommitAnnotationsInBatchError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCommitAnnotationsInBatch
* @summary 查询指定 commit 的元数据。Get commit annotations in batch.
* @request post:/{repo}/-/git/commit-annotations-in-batch
----------------------------------
* @param {string} arg0
* @param {WebGetCommitAnnotationsInBatchForm} arg1
* @param {RequestConfig} arg2 - Other reuqest params
*/
async function _default(repo, get_commit_annotations_form, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-annotations-in-batch`,
_apiTag: "/{repo}/-/git/commit-annotations-in-batch",
method: "post",
data: get_commit_annotations_form,
_originParams: {
method: "post",
_apiTag: "/{repo}/-/git/commit-annotations-in-batch",
path: {
repo
},
body: get_commit_annotations_form
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-annotations/{sha}
*/
/**
* @description getCommitAnnotations request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitAnnotationsRes Success Response Type
*/
/**
* @description GetCommitAnnotationsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCommitAnnotations
* @summary 查询指定 commit 的元数据。Get commit annotations.
* @request get:/{repo}/-/git/commit-annotations/{sha}
----------------------------------
* @param {GetCommitAnnotationsParams} arg0 - getCommitAnnotations request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
sha
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-annotations/${sha}`,
_apiTag: "/{repo}/-/git/commit-annotations/{sha}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/commit-annotations/{sha}",
path: {
repo,
sha
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-assets/{sha1}
*/
/**
* @description getCommitAssetsBySha request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitAssetsByShaRes Success Response Type
*/
/**
* @description GetCommitAssetsByShaError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCommitAssetsBySha
* @summary 查询指定 commit 的附件。List commit assets.
* @request get:/{repo}/-/git/commit-assets/{sha1}
----------------------------------
* @param {GetCommitAssetsByShaParams} arg0 - getCommitAssetsBySha request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
sha1
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-assets/${sha1}`,
_apiTag: "/{repo}/-/git/commit-assets/{sha1}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/commit-assets/{sha1}",
path: {
repo,
sha1
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/commit-assets/download/{commit_id}/{filename}
*/
/**
* @description getCommitAssets request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitAssetsRes Success Response Type
*/
/**
* @description GetCommitAssetsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-contents:r
* @tags Git
* @name getCommitAssets
* @summary 发起一个获取 commits 附件的请求, 302到有一定效期的下载地址。Get a request to fetch a commit assets and returns 302 redirect to the assets URL with specific valid time.
* @request get:/{repo}/-/commit-assets/download/{commit_id}/{filename}
----------------------------------
* @param {GetCommitAssetsParams} arg0 - getCommitAssets request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
commit_id,
filename,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/commit-assets/download/${commit_id}/${filename}`,
_apiTag: "/{repo}/-/commit-assets/download/{commit_id}/{filename}",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/{repo}/-/commit-assets/download/{commit_id}/{filename}",
path: {
repo,
commit_id,
filename
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commit-statuses/{commitish}
*/
/**
* @description getCommitStatuses request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitStatusesRes Success Response Type
*/
/**
* @description GetCommitStatusesError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCommitStatuses
* @summary 查询指定 commit 的提交状态。List commit check statuses.
* @request get:/{repo}/-/git/commit-statuses/{commitish}
----------------------------------
* @param {GetCommitStatusesParams} arg0 - getCommitStatuses request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
commitish
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commit-statuses/${commitish}`,
_apiTag: "/{repo}/-/git/commit-statuses/{commitish}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/commit-statuses/{commitish}",
path: {
repo,
commitish
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/commits/{ref}
*/
/**
* @description getCommit request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCommitRes Success Response Type
*/
/**
* @description GetCommitError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCommit
* @summary 查询指定 commit。Get a commit.
* @request get:/{repo}/-/git/commits/{ref}
----------------------------------
* @param {GetCommitParams} arg0 - getCommit request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
ref
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/commits/${ref}`,
_apiTag: "/{repo}/-/git/commits/{ref}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/commits/{ref}",
path: {
repo,
ref
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/compare/{base_head}
*/
/**
* @description getCompareCommits request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetCompareCommitsRes Success Response Type
*/
/**
* @description GetCompareCommitsError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getCompareCommits
* @summary 比较两个提交、分支或标签之间差异的接口。Compare two commits, branches, or tags.
* @request get:/{repo}/-/git/compare/{base_head}
----------------------------------
* @param {GetCompareCommitsParams} arg0 - getCompareCommits request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
base_head
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/compare/${base_head}`,
_apiTag: "/{repo}/-/git/compare/{base_head}",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/compare/{base_head}",
path: {
repo,
base_head
}
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/contents
*/
/**
* @description getContentWithoutPath request params
*/
/**
* @description Other reuqest params
*/
/**
* @description GetContentWithoutPathRes Success Response Type
*/
/**
* @description GetContentWithoutPathError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getContentWithoutPath
* @summary 查询仓库文件和目录内容。List repository files and directories.
* @request get:/{repo}/-/git/contents
----------------------------------
* @param {GetContentWithoutPathParams} arg0 - getContentWithoutPath request params
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default({
repo,
...query
}, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/contents`,
_apiTag: "/{repo}/-/git/contents",
method: "get",
params: query,
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/contents",
path: {
repo
},
query: query
}
});
}"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _core = _interopRequireDefault(require("../../core/core.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-nocheck
/* tslint:disable */
/* eslint-disable */
/*
* -------------------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA CNB-API-GENERATE ##
* ## ##
* ## AUTHOR: bapelin ##
* ## SOURCE: https://cnb.woa.com/cnb/frontend-science/cnb-api-generate ##
* -------------------------------------------------------------------------
* @Version 2.2.5
* @Source /{repo}/-/git/head
*/
/**
* @description Other reuqest params
*/
/**
* @description GetHeadRes Success Response Type
*/
/**
* @description GetHeadError Error Response Type
*/
/**
* @description 访问令牌调用此接口需包含以下权限。Required permissions for access token.
* repo-code:r
* @tags Git
* @name getHead
* @summary 获取仓库默认分支。Get the default branch of the repository.
* @request get:/{repo}/-/git/head
----------------------------------
* @param {string} arg0
* @param {RequestConfig} arg1 - Other reuqest params
*/
async function _default(repo, {
req,
options,
...axiosConfig
} = {}) {
return await _core.default.request({
...axiosConfig,
_next_req: req,
options: options,
url: `/${repo}/-/git/head`,
_apiTag: "/{repo}/-/git/head",
method: "get",
_originParams: {
method: "get",
_apiTag: "/{repo}/-/git/head",
path: {
repo
}
}
});
}