-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57b0ef0
commit 9af5323
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,9 @@ public class BitBucketFlowRegistryClient extends AbstractGitFlowRegistryClient { | |
APP_PASSWORD, | ||
OAUTH_TOKEN_PROVIDER); | ||
|
||
static final String STORAGE_LOCATION_PREFIX = "[email protected]:"; | ||
static final String STORAGE_LOCATION_FORMAT = STORAGE_LOCATION_PREFIX + "%s/%s.git"; | ||
|
||
@Override | ||
protected List<PropertyDescriptor> createPropertyDescriptors() { | ||
return PROPERTY_DESCRIPTORS; | ||
|
@@ -151,13 +154,12 @@ protected GitRepositoryClient createRepositoryClient(final FlowRegistryClientCon | |
|
||
@Override | ||
public boolean isStorageLocationApplicable(FlowRegistryClientConfigurationContext context, String location) { | ||
// TODO Auto-generated method stub | ||
return false; | ||
return location != null && location.startsWith(STORAGE_LOCATION_PREFIX); | ||
} | ||
|
||
@Override | ||
protected String getStorageLocation(GitRepositoryClient repositoryClient) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
final BitBucketRepositoryClient gitLabRepositoryClient = (BitBucketRepositoryClient) repositoryClient; | ||
return STORAGE_LOCATION_FORMAT.formatted(gitLabRepositoryClient.getWorkspace(), gitLabRepositoryClient.getRepoName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters