Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-43507] Fix the <scm:traits> taglib
- Loading branch information
|
@@ -132,7 +132,7 @@ |
|
|
* <p> |
|
|
* The template uses {@code @{...}} as that is an illegal sequence in a remote name |
|
|
* |
|
|
* @see <a href="https://github.com/git/git/blob/027a3b943b444a3e3a76f9a89803fc10245b858f/refs.c#L61-L68>git |
|
|
* @see <a href="https://github.com/git/git/blob/027a3b943b444a3e3a76f9a89803fc10245b858f/refs.c#L61-L68">git |
|
|
* source code rules on ref spec names</a> |
|
|
* @since 3.4.0 |
|
|
*/ |
|
@@ -266,7 +266,7 @@ public String getGitTool() { |
|
|
/** |
|
|
* Returns the {@link SCMSourceTrait} instances for this {@link AbstractGitSCMSource}. |
|
|
* @return the {@link SCMSourceTrait} instances |
|
|
* @sinec 3.4.0 |
|
|
* @since 3.4.0 |
|
|
*/ |
|
|
@NonNull |
|
|
public List<SCMSourceTrait> getTraits() { |
|
@@ -729,7 +729,7 @@ protected StandardUsernameCredentials getCredentials() { |
|
|
* {@link #build(SCMHead, SCMRevision)} immediately prior to returning {@link GitSCMBuilder#build()}. |
|
|
* Subclasses should override this method if they need to overrule builder behaviours defined by traits. |
|
|
* |
|
|
* @param builder |
|
|
* @param builder the builder to decorate. |
|
|
*/ |
|
|
protected void decorate(GitSCMBuilder<?> builder) { |
|
|
} |
|
|
|
@@ -501,7 +501,7 @@ public ListBoxModel doFillGitToolItems() { |
|
|
return SCMSourceTrait._for(this, GitSCMSourceContext.class, GitSCMBuilder.class); |
|
|
} |
|
|
|
|
|
public List<SCMSourceTrait> getDefaultTraits() { |
|
|
public List<SCMSourceTrait> getTraitDefaults() { |
|
|
return Collections.emptyList(); |
|
|
} |
|
|
} |
|
|
|
@@ -23,16 +23,14 @@ |
|
|
~ THE SOFTWARE. |
|
|
--> |
|
|
|
|
|
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:c="/lib/credentials"> |
|
|
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:c="/lib/credentials" xmlns:scm="/jenkins/scm/api/form"> |
|
|
<f:entry title="${%Project Repository}" field="remote"> |
|
|
<f:textbox/> |
|
|
</f:entry> |
|
|
<f:entry title="${%Credentials}" field="credentialsId"> |
|
|
<c:select/> |
|
|
</f:entry> |
|
|
<f:entry title="${%Behaviours}"> |
|
|
<f:hetero-list name="traits" items="${instance == null ? descriptor.defaultTraits : instance.traits}" |
|
|
descriptors="${descriptor[attrs.field+'Descriptors'] ?: descriptor.getPropertyType(instance,'traits').getApplicableItemDescriptors()}" |
|
|
hasHeader="true" honorOrder="true" oneEach="true"/> |
|
|
<scm:traits field="traits"/> |
|
|
</f:entry> |
|
|
</j:jelly> |