Skip to content

Commit

Permalink
use checkoutCredentialsId if available (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHelwig authored Mar 13, 2024
1 parent 2835818 commit cf4056c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package com.cloudbees.jenkins.plugins.bitbucket;

import com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.DescriptorImpl;
import com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator;
import com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketHref;
import com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRepository;
Expand Down Expand Up @@ -160,7 +161,7 @@ public BitbucketGitSCMBuilder withCredentials(String credentialsId, BitbucketRep
StandardCredentials credentials = BitbucketCredentials.lookupCredentials(
scmSource.getServerUrl(),
scmSource.getOwner(),
credentialsId,
DescriptorImpl.SAME.equals(scmSource.getCheckoutCredentialsId()) ? credentialsId : scmSource.getCheckoutCredentialsId(),

Check warning on line 164 in src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketGitSCMBuilder.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 164 is only partially covered, one branch is missing
StandardCredentials.class
);

Expand Down

0 comments on commit cf4056c

Please sign in to comment.