use of hudson.plugins.git.GitSCM in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMSource method build.
@Nonnull
@Override
public SCM build(@Nonnull SCMHead head, @CheckForNull SCMRevision revision) {
GitSCM scm;
if (head instanceof GitLabSCMHead) {
scm = ((GitLabSCMHead) head).createSCM(this);
if (revision instanceof SCMRevisionImpl) {
scm.getExtensions().add(new BuildChooserSetting(new SpecificRevisionBuildChooser((SCMRevisionImpl) revision)));
}
} else {
scm = (GitSCM) super.build(head, revision);
scm.setBrowser(getBrowser());
}
return scm;
}
Aggregations