提交 f1d319c8 编写于 作者: 徐晓伟's avatar 徐晓伟

github.com/xanzy/go-gitlab from v0.92.3 to v0.93.0 use SDK

https://jihulab.com/xuxiaowei-com-cn/gitlab-go/-/issues/5
上级 f5d969ec
......@@ -4,7 +4,7 @@ go 1.21
require (
github.com/urfave/cli/v2 v2.25.7
github.com/xanzy/go-gitlab v0.92.3
github.com/xanzy/go-gitlab v0.93.0
github.com/xuxiaowei-com-cn/git-go v0.0.0-20231001210858-ffa8a39f60e3
gopkg.in/yaml.v3 v3.0.1
)
......
......@@ -6,8 +6,6 @@ import (
"github.com/xanzy/go-gitlab"
"github.com/xuxiaowei-com-cn/gitlab-go/constant"
"github.com/xuxiaowei-com-cn/gitlab-go/flag"
"github.com/xuxiaowei-com-cn/gitlab-go/utils"
"net/http"
)
// JobsArtifacts 作业产物 API https://docs.gitlab.cn/jh/api/job_artifacts.html
......@@ -80,20 +78,8 @@ func JobsArtifacts() *cli.Command {
return err
}
fmt.Printf("Delete ProjectId: %s, Artifacts\n", id)
project, err := utils.ParseID(id)
if err != nil {
return err
}
u := fmt.Sprintf("projects/%s/artifacts", gitlab.PathEscape(project))
req, err := gitClient.NewRequest(http.MethodDelete, u, nil, nil)
if err != nil {
return err
}
response, err := gitClient.Do(req, nil)
fmt.Printf("Delete ProjectId: %s Artifacts\n", id)
response, err := gitClient.Jobs.DeleteProjectArtifacts(id)
fmt.Printf("Response StatusCode: %d\n", response.Response.StatusCode)
if err != nil {
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册