Skip to content

Commit

Permalink
recognise BitBucket hosts by WWW-Authenticate header
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Oct 19, 2023
1 parent d0ae441 commit fc51bc1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Atlassian.Bitbucket.Cloud;
Expand Down Expand Up @@ -43,6 +44,10 @@ public bool IsSupported(InputArguments input)
return false;
}

if (input.WwwAuth.Any(x => x.Contains("realm=\"Atlassian Bitbucket\"")))
return true;
}

// Split port number and hostname from host input argument
if (!input.TryGetHostAndPort(out string hostName, out _))

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Invalid token 'if' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Invalid token '!' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Invalid token '(' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-x64)

Invalid token 'out' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Invalid token 'if' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Invalid token '!' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Invalid token '(' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Windows

Invalid token 'out' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Invalid token 'if' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Invalid token '!' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Invalid token '(' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / Linux

Invalid token 'out' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Invalid token 'if' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Invalid token '!' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Invalid token '(' in class, record, struct, or interface member declaration

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Type expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Tuple must contain at least two elements.

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

) expected

Check failure on line 52 in src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

View workflow job for this annotation

GitHub Actions / macOS (osx-arm64)

Invalid token 'out' in class, record, struct, or interface member declaration
{
Expand Down

0 comments on commit fc51bc1

Please sign in to comment.