From 3313594d66d3754fc1ab76a6a402f509321d4afa Mon Sep 17 00:00:00 2001 From: Gustavo Bini <6403728+gustavobini@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:47:32 +0200 Subject: [PATCH] fix: allow selecting FreeStyleProject in jenkins scopes UI This fixes https://github.com/apache/incubator-devlake/issues/7400. --- backend/plugins/jenkins/api/remote_api.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/backend/plugins/jenkins/api/remote_api.go b/backend/plugins/jenkins/api/remote_api.go index c5052addd91..253a333bf55 100644 --- a/backend/plugins/jenkins/api/remote_api.go +++ b/backend/plugins/jenkins/api/remote_api.go @@ -55,17 +55,8 @@ func listJenkinsRemoteScopes( getJobsPageCallBack := func(job *models.Job) errors.Error { switch job.Class { case "org.jenkinsci.plugins.workflow.job.WorkflowJob": - // this is a scope - jenkinsJob := job.ToJenkinsJob() - children = append(children, dsmodels.DsRemoteApiScopeListEntry[models.JenkinsJob]{ - Type: api.RAS_ENTRY_TYPE_SCOPE, - Id: jenkinsJob.ScopeId(), - Name: jenkinsJob.ScopeName(), - FullName: jenkinsJob.ScopeFullName(), - Data: jenkinsJob, - ParentId: parentId, - }) case "org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject": + case "hudson.model.FreeStyleProject": // this is a scope jenkinsJob := job.ToJenkinsJob() children = append(children, dsmodels.DsRemoteApiScopeListEntry[models.JenkinsJob]{