diff --git a/internal/commands/util/pr.go b/internal/commands/util/pr.go index 4451c9595..d399bba75 100644 --- a/internal/commands/util/pr.go +++ b/internal/commands/util/pr.go @@ -161,7 +161,7 @@ func runPRDecoration(prWrapper wrappers.PRWrapper, policyWrapper wrappers.Policy namespaceFlag, _ := cmd.Flags().GetString(params.NamespaceFlag) repoNameFlag, _ := cmd.Flags().GetString(params.RepoNameFlag) prNumberFlag, _ := cmd.Flags().GetInt(params.PRNumberFlag) - serverUrl, _ := cmd.Flags().GetString(params.CodeRepositoryFlag) + apiUrl, _ := cmd.Flags().GetString(params.CodeRepositoryFlag) scanRunningOrQueued, err := isScanRunningOrQueued(scansWrapper, scanID) @@ -188,7 +188,7 @@ func runPRDecoration(prWrapper wrappers.PRWrapper, policyWrapper wrappers.Policy RepoName: repoNameFlag, PrNumber: prNumberFlag, Policies: policies, - ServerUrl: serverUrl, + ApiUrl: apiUrl, } prResponse, errorModel, err := prWrapper.PostPRDecoration(prModel) if err != nil { @@ -213,7 +213,7 @@ func runPRDecorationGitlab(prWrapper wrappers.PRWrapper, policyWrapper wrappers. repoNameFlag, _ := cmd.Flags().GetString(params.RepoNameFlag) iIDFlag, _ := cmd.Flags().GetInt(params.PRIidFlag) gitlabProjectIDFlag, _ := cmd.Flags().GetInt(params.PRGitlabProjectFlag) - serverUrl, _ := cmd.Flags().GetString(params.CodeRepositoryFlag) + apiUrl, _ := cmd.Flags().GetString(params.CodeRepositoryFlag) scanRunningOrQueued, err := isScanRunningOrQueued(scansWrapper, scanID) @@ -241,7 +241,7 @@ func runPRDecorationGitlab(prWrapper wrappers.PRWrapper, policyWrapper wrappers. IiD: iIDFlag, GitlabProjectID: gitlabProjectIDFlag, Policies: policies, - ServerUrl: serverUrl, + ApiUrl: apiUrl, } prResponse, errorModel, err := prWrapper.PostGitlabPRDecoration(prModel) diff --git a/internal/wrappers/pr.go b/internal/wrappers/pr.go index 6ff23e905..a8cf119f5 100644 --- a/internal/wrappers/pr.go +++ b/internal/wrappers/pr.go @@ -11,7 +11,7 @@ type PRModel struct { RepoName string `json:"repoName"` PrNumber int `json:"prNumber"` Policies []PrPolicy `json:"violatedPolicyList"` - ServerUrl string `json:"ServerUrl"` + ApiUrl string `json:"apiUrl"` } type GitlabPRModel struct { @@ -22,7 +22,7 @@ type GitlabPRModel struct { IiD int `json:"iid"` GitlabProjectID int `json:"gitlabProjectID"` Policies []PrPolicy `json:"violatedPolicyList"` - ServerUrl string `json:"ServerUrl"` + ApiUrl string `json:"apiUrl"` } type PRWrapper interface {