From 4c2bd4819c8cae2eee1f2758fc1f2895a026bc3a Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 20 Jun 2019 17:34:04 +0800 Subject: [PATCH] fix ci Signed-off-by: runzexia --- pkg/gojenkins/credential.go | 16 ++++++++-------- pkg/models/devops/project_credential_handler.go | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/gojenkins/credential.go b/pkg/gojenkins/credential.go index 0fc8f937c..da41bb908 100644 --- a/pkg/gojenkins/credential.go +++ b/pkg/gojenkins/credential.go @@ -87,18 +87,18 @@ type CredentialResponse struct { TypeName string `json:"typeName"` DisplayName string `json:"displayName"` Fingerprint *struct { - FileName string `json:"file_name,omitempty" description:"credential's display name and description"` - Hash string `json:"hash,omitempty" description:"credential's hash'"` + FileName string `json:"file_name,omitempty" description:"Credential's display name and description"` + Hash string `json:"hash,omitempty" description:"Credential's hash"` Usage []*struct { - Name string `json:"name,omitempty" description:"jenkins pipeline full name"` + Name string `json:"name,omitempty" description:"Jenkins pipeline full name"` Ranges struct { Ranges []*struct { - Start int `json:"start,omitempty" description:"start build number"` - End int `json:"end,omitempty" description:"end build number"` + Start int `json:"start,omitempty" description:"Start build number"` + End int `json:"end,omitempty" description:"End build number"` } `json:"ranges,omitempty"` - } `json:"ranges,omitempty" description:"all build num using credential"` - } `json:"usage,omitempty" description:"all usage of credential"` - } `json:"fingerprint,omitempty" description:"usage of credential"` + } `json:"ranges,omitempty" description:"The build number of all pipelines that use this credential"` + } `json:"usage,omitempty" description:"all usage of Credential"` + } `json:"fingerprint,omitempty" description:"usage of the Credential"` Description string `json:"description,omitempty"` Domain string `json:"domain"` } diff --git a/pkg/models/devops/project_credential_handler.go b/pkg/models/devops/project_credential_handler.go index dce8416c7..cdf92342e 100644 --- a/pkg/models/devops/project_credential_handler.go +++ b/pkg/models/devops/project_credential_handler.go @@ -421,17 +421,17 @@ func formatCredentialResponse( response.DisplayName = jenkinsCredentialResponse.DisplayName if jenkinsCredentialResponse.Fingerprint != nil && jenkinsCredentialResponse.Fingerprint.Hash != "" { response.Fingerprint = &struct { - FileName string `json:"file_name,omitempty" description:"credential's display name and description"` - Hash string `json:"hash,omitempty" description:"credential's hash'"` + FileName string `json:"file_name,omitempty" description:"Credential's display name and description"` + Hash string `json:"hash,omitempty" description:"Credential's hash"` Usage []*struct { - Name string `json:"name,omitempty" description:"jenkins pipeline full name"` + Name string `json:"name,omitempty" description:"Jenkins pipeline full name"` Ranges struct { Ranges []*struct { - Start int `json:"start,omitempty" description:"start build number"` - End int `json:"end,omitempty" description:"end build number"` + Start int `json:"start,omitempty" description:"Start build number"` + End int `json:"end,omitempty" description:"End build number"` } `json:"ranges,omitempty"` - } `json:"ranges,omitempty" description:"all build num using credential"` - } `json:"usage,omitempty" description:"all usage of credential"` + } `json:"ranges,omitempty" description:"The build number of all pipelines that use this credential"` + } `json:"usage,omitempty" description:"all usage of Credential"` }{} response.Fingerprint.FileName = jenkinsCredentialResponse.Fingerprint.FileName response.Fingerprint.Hash = jenkinsCredentialResponse.Fingerprint.Hash