Compare commits

...

2 Commits

Author SHA1 Message Date
73e18db55e chore(release): publish
- @egg/net-tool@1.21.0
2024-12-20 10:36:19 +00:00
4bad60d556 feat(net-tool): 添加删除 GitLab Web 钩子功能并优化 del 方法参数
All checks were successful
/ release (push) Successful in 25s
2024-12-20 10:35:55 +00:00
5 changed files with 19 additions and 3 deletions

2
package-lock.json generated
View File

@ -12394,7 +12394,7 @@
},
"packages/net-tool": {
"name": "@egg/net-tool",
"version": "1.20.0",
"version": "1.21.0",
"license": "ISC",
"dependencies": {
"@egg/logger": "^1.6.0",

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.21.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.20.0...@egg/net-tool@1.21.0) (2024-12-20)
### Features
- **net-tool:** 添加删除 GitLab Web 钩子功能并优化 del 方法参数 ([4bad60d](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/4bad60d55625c376286aac6fdec74b8d0e36ac24))
# 1.20.0 (2024-12-20)
### Features

View File

@ -1,6 +1,6 @@
{
"name": "@egg/net-tool",
"version": "1.20.0",
"version": "1.21.0",
"description": "Net Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

View File

@ -24,6 +24,16 @@ class Hook extends GitlabBaseService {
null
)
}
/**
* GitLab Web
* @param {number} hookId ID
* @returns {Promise<ProjectHookSchema | null>}
*/
async delete(hookId: number) {
const URL = `/projects/${this.project_id}/hooks/${hookId}`
return this.errorWarp<ProjectHookSchema | null>(() => this.del(URL), null)
}
}
export default Hook

View File

@ -313,7 +313,7 @@ class NetToolBase {
*/
protected del<T = any>(
url: string,
payload: any,
payload?: any,
queryParams?: any,
additionalHeaders?: any
): Promise<T> {