Skip to content

Commit

Permalink
Replace the glob-based CODEOWNERS parser with regex-based (#5063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik authored Jan 9, 2023
1 parent 6b3ee03 commit 4b7f14b
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 245 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static int Main(
bool filterOutNonUserAliases = false
)
{
var target = targetDirectory.ToLower().Trim();
var target = targetDirectory.Trim();
try {
var codeOwnerEntry = CodeOwnersFile.ParseAndFindOwnersForClosestMatch(codeOwnerFilePath, target);
if (filterOutNonUserAliases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="CommandLine.Net" Version="2.3.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
</ItemGroup>

</Project>
299 changes: 180 additions & 119 deletions tools/code-owners-parser/CodeOwnersParser/MatchedCodeOwnerEntry.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tools/identity-resolution/identity-resolution.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />
<PackageReference Include="Microsoft.VisualStudio.Services.Notifications.WebApi" Version="16.170.0" />
<PackageReference Include="YamlDotNet" Version="6.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.3.0-alpha.19317.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.Services.Common;
Expand Down Expand Up @@ -39,12 +39,10 @@ static async Task Main(
var devOpsCreds = new VssBasicCredential("nobody", devOpsToken);
var devOpsConnection = new VssConnection(new Uri($"https://dev.azure.com/{organization}/"), devOpsCreds);

#pragma warning disable CS0618 // Type or member is obsolete
var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddConsole(config => { config.IncludeScopes = true; });
builder.AddSimpleConsole(config => { config.IncludeScopes = true; });
});
#pragma warning restore CS0618 // Type or member is obsolete
var devOpsServiceLogger = loggerFactory.CreateLogger<AzureDevOpsService>();
var notificationConfiguratorLogger = loggerFactory.CreateLogger<NotificationConfigurator>();

Expand Down

0 comments on commit 4b7f14b

Please sign in to comment.