config(git): 引入develop长期开发分支模型和git工作流自动化

This commit is contained in:
2026-06-11 15:24:38 +08:00
parent 3b851a195e
commit ac7a3abda9
12 changed files with 781 additions and 72 deletions
+21
View File
@@ -222,6 +222,27 @@ class GiteaAPI {
});
}
// ====== Pull Requests ======
listPullRequests(params = {}) {
return this.request('GET', '/pulls', null, { state: 'open', limit: 50, ...params });
}
getPullRequest(number) {
return this.request('GET', `/pulls/${number}`);
}
createPullRequest(data) {
return this.request('POST', '/pulls', data);
}
mergePullRequest(number, data = {}) {
return this.request('POST', `/pulls/${number}/merge`, {
Do: data.style || 'merge', // merge | squash | rebase
...data,
});
}
// ====== 辅助方法 ======
/** 通过名称查找标签,返回 ID(不存在则返回 null) */