Skip to content

Commit

Permalink
Merge pull request #429 from mamh-java/workaround-remove-MultiSCM
Browse files Browse the repository at this point in the history
add workaround to remove multiplescms.MultiSCM support in pipeline
  • Loading branch information
jglick authored Mar 25, 2024
2 parents fbed9ac + d62d034 commit 937e0b3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import jenkins.model.Jenkins;
import jenkins.scm.api.SCMFileSystem;
import jenkins.security.HMACConfidentialKey;
Expand Down Expand Up @@ -218,7 +220,8 @@ private String getFilePathSuffix() {
public Collection<? extends SCMDescriptor<?>> getApplicableDescriptors() {
StaplerRequest req = Stapler.getCurrentRequest();
Job<?,?> job = req != null ? req.findAncestorObject(Job.class) : null;
return SCM._for(job);
return SCM._for(job).stream().filter(d -> !"org.jenkinsci.plugins.multiplescms.MultiSCM".equals(d.getId())).collect(Collectors.toList());

}

// TODO doCheckLightweight impossible to write even though we have SCMFileSystem.supports(SCM), because form validation cannot pass the SCM object

Check warning on line 227 in plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: doCheckLightweight impossible to write even though we have SCMFileSystem.supports(SCM), because form validation cannot pass the SCM object
Expand Down

0 comments on commit 937e0b3

Please sign in to comment.