config(git): 引入develop长期开发分支模型和git工作流自动化
This commit is contained in:
@@ -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',
|
||||
...data,
|
||||
});
|
||||
}
|
||||
|
||||
// ====== 辅助方法 ======
|
||||
|
||||
/** 通过名称查找标签,返回 ID(不存在则返回 null) */
|
||||
|
||||
Reference in New Issue
Block a user