Skip to content

Commit 631fbf9

Browse files
Merge branch '50-bitbucket-workspace'
2 parents 64d2863 + 6334683 commit 631fbf9

4 files changed

Lines changed: 1 addition & 54 deletions

File tree

src/ScmBackup/Hosters/Bitbucket/BitbucketApi.cs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,7 @@ public List<HosterRepository> GetRepositoryList(ConfigSource source)
3030
request.AddBasicAuthHeader(source.AuthName, source.Password);
3131
}
3232

33-
string url = string.Empty;
34-
string apiUsername = null;
35-
36-
// Issue #32: from Apr 29 2019, usernames (not team names) must be replaced by UUIDs
37-
if (source.Type.ToLower() == "user")
38-
{
39-
url = "/2.0/workspaces/" + source.Name;
40-
41-
var result = request.Execute(url).Result;
42-
43-
if (result.IsSuccessStatusCode)
44-
{
45-
var apiResponse = JsonConvert.DeserializeObject<BitbucketApiUserResponse>(result.Content);
46-
if (apiResponse != null)
47-
{
48-
apiUsername = Uri.EscapeUriString(apiResponse.uuid);
49-
}
50-
}
51-
52-
if (string.IsNullOrWhiteSpace(apiUsername))
53-
{
54-
throw new InvalidOperationException(string.Format(Resource.ApiBitbucketCantGetUuid, source.Name));
55-
}
56-
}
57-
else
58-
{
59-
apiUsername = source.Name;
60-
}
61-
62-
63-
url = "/2.0/repositories/" + apiUsername;
33+
string url = "/2.0/repositories/" + source.Name;
6434

6535
while (url != null)
6636
{

src/ScmBackup/Hosters/Bitbucket/BitbucketApiUserResponse.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/ScmBackup/Resource.Designer.cs

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ScmBackup/Resource.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@
120120
<data name="ApiAuthenticationFailed" xml:space="preserve">
121121
<value>Authentication failed for {0}</value>
122122
</data>
123-
<data name="ApiBitbucketCantGetUuid" xml:space="preserve">
124-
<value>Unable to get the UUID for username {0} from the Bitbucket API</value>
125-
</data>
126123
<data name="ApiGettingRepos" xml:space="preserve">
127124
<value>Getting repositories for source '{0}' from hoster '{1}'</value>
128125
</data>

0 commit comments

Comments
 (0)