Skip to content
Browse files

[JENKINS-44271] doFillcredentialsId to look for Item not SCMSourceOwner.

The method GitSCMSource.DescriptorImpl#doFillCredentialsIdItems
expects the parameter 'context' to be an SCMSourceOwner which breaks
the ability to add a global library at the level of a folder with the
modern SCM implementation. Changing the parameter type from
SCMSourceOwner to Item solves the issue.
  • Loading branch information
acontes1a committed Jun 26, 2017
1 parent 5b31a94 commit 9841317807c4320ebb7db9688f28939fdb8198e5
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/jenkins/plugins/git/
@@ -424,7 +424,7 @@ public String getDisplayName() {
return Messages.GitSCMSource_DisplayName();

public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner context,
public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Item context,
@QueryParameter String remote,
@QueryParameter String credentialsId) {
if (context == null && !Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER) ||
@@ -441,8 +441,8 @@ public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner cont

public FormValidation doCheckCredentialsId(@AncestorInPath SCMSourceOwner context,
public FormValidation doCheckCredentialsId(@AncestorInPath Item context,
@QueryParameter String remote,
@QueryParameter String value) {
if (context == null && !Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER) ||

0 comments on commit 9841317

Please sign in to comment.
You can’t perform that action at this time.