未验证 提交 785e922b 编写于 作者: R runzexia 提交者: GitHub

Merge branch 'master' into uuid-utils

...@@ -204,7 +204,6 @@ func addWebService(c *restful.Container) error { ...@@ -204,7 +204,6 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("credentials", "credential's Id")). Param(webservice.PathParameter("credentials", "credential's Id")).
Param(webservice.QueryParameter("domain", "credential's domain")).
Param(webservice.QueryParameter("content", "get additional content")). Param(webservice.QueryParameter("content", "get additional content")).
Returns(http.StatusOK, RespOK, devops.JenkinsCredential{}). Returns(http.StatusOK, RespOK, devops.JenkinsCredential{}).
Reads(devops.JenkinsCredential{})) Reads(devops.JenkinsCredential{}))
...@@ -214,8 +213,6 @@ func addWebService(c *restful.Container) error { ...@@ -214,8 +213,6 @@ func addWebService(c *restful.Container) error {
Doc("Get project credential pipeline"). Doc("Get project credential pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("credentials", "credential's Id")).
Param(webservice.QueryParameter("domain", "credential's domain")).
Returns(http.StatusOK, RespOK, []devops.JenkinsCredential{}). Returns(http.StatusOK, RespOK, []devops.JenkinsCredential{}).
Reads([]devops.JenkinsCredential{})) Reads([]devops.JenkinsCredential{}))
...@@ -754,7 +751,7 @@ func addWebService(c *restful.Container) error { ...@@ -754,7 +751,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.POST("/devops/notifycommit"). webservice.Route(webservice.POST("/devops/notifycommit").
To(devopsapi.PostNotifyCommit). To(devopsapi.PostNotifyCommit).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get notify commit by HTTP POST method."). Doc("Get notification commit by HTTP POST method.").
Consumes("application/json"). Consumes("application/json").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.QueryParameter("url", "url of git scm"). Param(webservice.QueryParameter("url", "url of git scm").
......
...@@ -1025,9 +1025,9 @@ type ReqJson struct { ...@@ -1025,9 +1025,9 @@ type ReqJson struct {
// ToJenkinsfile response // ToJenkinsfile response
type ResJenkinsfile struct { type ResJenkinsfile struct {
Status string `json:"status,omitempty" description:"status"` Status string `json:"status,omitempty" description:"status e.g. ok"`
Data struct { Data struct {
Result string `json:"result,omitempty" description:"result"` Result string `json:"result,omitempty" description:"result e.g. success"`
Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"` Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"`
Errors []struct { Errors []struct {
Location []string `json:"location,omitempty" description:"err location"` Location []string `json:"location,omitempty" description:"err location"`
...@@ -1041,9 +1041,9 @@ type ReqJenkinsfile struct { ...@@ -1041,9 +1041,9 @@ type ReqJenkinsfile struct {
} }
type ResJson struct { type ResJson struct {
Status string `json:"status,omitempty" description:"status"` Status string `json:"status,omitempty" description:"status e.g. ok"`
Data struct { Data struct {
Result string `json:"result,omitempty" description:"result"` Result string `json:"result,omitempty" description:"result e.g. success"`
JSON struct { JSON struct {
Pipeline struct { Pipeline struct {
Stages []interface{} `json:"stages,omitempty" description:"stages"` Stages []interface{} `json:"stages,omitempty" description:"stages"`
......
...@@ -24,7 +24,7 @@ type DevOpsProjectMembership struct { ...@@ -24,7 +24,7 @@ type DevOpsProjectMembership struct {
Username string `json:"username" description:"member's username,username can uniquely identify a user"` Username string `json:"username" description:"member's username,username can uniquely identify a user"`
ProjectId string `json:"project_id" db:"project_id" description:"the devops projects which project membership belongs to"` ProjectId string `json:"project_id" db:"project_id" description:"the devops projects which project membership belongs to"`
Role string `json:"role" description:"devops project membership's role type. e.g. owner '"` Role string `json:"role" description:"devops project membership's role type. e.g. owner '"`
Status string `json:"status" description:"Desperated, status of project membership"` Status string `json:"status" description:"Desperated, status of project membership. e.g. active "`
GrantBy string `json:"grand_by,omitempty" description:"Username of the user who assigned the role"` GrantBy string `json:"grand_by,omitempty" description:"Username of the user who assigned the role"`
} }
......
...@@ -52,7 +52,7 @@ func UpdateProject(project *DevOpsProject) (*DevOpsProject, error) { ...@@ -52,7 +52,7 @@ func UpdateProject(project *DevOpsProject) (*DevOpsProject, error) {
query.Set(DevOpsProjectExtraColumn, project.Extra) query.Set(DevOpsProjectExtraColumn, project.Extra)
} }
if !govalidator.IsNull(project.Name) { if !govalidator.IsNull(project.Name) {
query.Set(DevOpsProjectNameColumn, project.Extra) query.Set(DevOpsProjectNameColumn, project.Name)
} }
if len(query.UpdateStmt.Value) > 0 { if len(query.UpdateStmt.Value) > 0 {
_, err := query. _, err := query.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册