Skip to content

Commit

Permalink
Merge pull request #124 from microsoft/staging
Browse files Browse the repository at this point in the history
Release - 2/20/24
  • Loading branch information
EricJohnson327 authored Feb 21, 2024
2 parents 928029b + e7a6ce8 commit 2c9ef0c
Show file tree
Hide file tree
Showing 138 changed files with 441 additions and 568 deletions.
6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[*.cs]

file_header_template = Copyright (c) Microsoft Corporation.\r\nLicensed under the MIT License.

#Core editorconfig formatting - indentation

#use soft tabs (spaces) for indentation
Expand Down Expand Up @@ -44,8 +46,8 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false

#Formatting - wrapping options

#leave code block on separate lines
csharp_preserve_single_line_blocks = false
#allow code blocks on single lines
csharp_preserve_single_line_blocks = true

#Style - Code block preferences

Expand Down
5 changes: 5 additions & 0 deletions DevHomeAzureExtension.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{E4D6
test\scripts\CleanWidgets.ps1 = test\scripts\CleanWidgets.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D1A35C30-001C-4907-A6FD-E59F25D432CF}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
</PropertyGroup>

<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Compile Include="$(MSBuildThisFileDirectory)\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\codeAnalysis\StyleCop.json" Link="StyleCop.json" />

<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
11 changes: 8 additions & 3 deletions TestingScenarios.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## Testing Scenarios

These are the testing scenarios that need to be validated before shipping a new release. When an automated test is added, please remove it from the below lists.

### Widgets
1. For each widget: user can configure the widget before pinning
1. For each widget: user can see widget in dashboard after pinning

1. For each widget: user can configure the widget immediately after first pin
1. For each widget: user can customize (reconfigure) the widget after it was initially configured
1. For each widget that supports customization: can be customized and persist after restart
1. Widgets have correct data
1. Widgets are adequately performant
1. Notificaitons can be enabled/disabled in Dev Home settings
1. Notifications are displayed

### Clone repositories
1. User can log in and get the list of repositories

1. User can log in and get the list of repositories
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parameters:
- release

variables:
MSIXVersion: '0.500'
MSIXVersion: '0.600'
solution: '**/DevHomeAzureExtension.sln'
appxPackageDir: 'AppxPackages'
testOutputArtifactDir: 'TestResults'
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $StartTime = Get-Date

if ($Help) {
Write-Host @"
Copyright (c) Microsoft Corporation and Contributors.
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
Syntax:
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/CreateBuildInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Param(
)

$Major = "0"
$Minor = "5"
$Minor = "6"
$Patch = "99" # default to 99 for local builds

$versionSplit = $Version.Split(".");
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $StartTime = Get-Date

if ($Help) {
Write-Host @"
Copyright (c) Microsoft Corporation and Contributors.
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
Syntax:
Expand Down
14 changes: 7 additions & 7 deletions build/scripts/Unstub.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ if ($projFileContent.Contains('Microsoft.Telemetry.Inbox.Managed')) {
return;
}

$xml = [xml]$projFileContent
$xml = [System.Xml.XmlDocument]$projFileContent
$xml.PreserveWhitespace = $true
$packageRef = $xml.SelectSingleNode("//ItemGroup/PackageReference")
$newNode = $packageRef.Clone()
$newNode.Include="Microsoft.Telemetry.Inbox.Managed"
$newNode.Version="10.0.25148.1001-220626-1600.rs-fun-deploy-dev5"
$parentNode = $packageRef.ParentNode
$parentNode.AppendChild($newNode)
$itemGroup = $xml.CreateElement("ItemGroup")
$packageRef = $xml.CreateElement("PackageReference")
$packageRef.SetAttribute("Include", "Microsoft.Telemetry.Inbox.Managed")
$packageRef.SetAttribute("Version", "10.0.25148.1001-220626-1600.rs-fun-deploy-dev5")
$itemGroup.AppendChild($packageRef)
$xml.Project.AppendChild($itemGroup)
$xml.Save($projFile)
15 changes: 6 additions & 9 deletions codeAnalysis/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "All current violations are due to Tuple shorthand and so valid.")]
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:ClosingSquareBracketsMustBeSpacedCorrectly", Justification = "Optional arrays need to be supported. Ex []?")]

[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "We follow the C# Core Coding Style which avoids using `this` unless absolutely necessary.")]

[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1200:UsingDirectivesMustBePlacedWithinNamespace", Justification = "We follow the C# Core Coding Style which puts using statements outside the namespace.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and have hight impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and have hight impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and have hight impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and have hight impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and has high impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and has high impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and has high impact in code changes.")]
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and has high impact in code changes.")]

[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1309:FieldNamesMustNotBeginWithUnderscore", Justification = "We follow the C# Core Coding Style which uses underscores as prefixes rather than using `this.`.")]

Expand Down
2 changes: 1 addition & 1 deletion codeAnalysis/StyleCop.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"settings": {
"documentationRules": {
"companyName": "Microsoft Corporation",
"copyrightText": "Copyright (c) Microsoft Corporation and Contributors\r\nLicensed under the MIT license.",
"copyrightText": "Copyright (c) Microsoft Corporation.\r\nLicensed under the MIT License.",
"xmlHeader": false,
"headerDecoration": "",
"fileNamingConvention": "metadata",
Expand Down
7 changes: 7 additions & 0 deletions exclusion.dic
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ brokerplugin
Entra
riid
enums
enums
Stdout
visualstudio
vssps
Entra
riid
foobar
4 changes: 2 additions & 2 deletions src/AzureExtension/AzureExtension.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Runtime.InteropServices;
using DevHomeAzureExtension.DeveloperId;
Expand Down
66 changes: 18 additions & 48 deletions src/AzureExtension/AzureExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BuildRing Condition="'$(BuildRing)'==''">Dev</BuildRing>
<DebugType>portable</DebugType>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -47,26 +48,26 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
<PackageReference Include="LibGit2Sharp" Version="0.29.0" />
<PackageReference Include="MessageFormat" Version="6.0.2" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.4" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.56.0" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.56.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.206-beta" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.2" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.369" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231008000" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Services.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="16.205.1" />
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
<PackageReference Include="LibGit2Sharp" Version="0.29.0" />
<PackageReference Include="MessageFormat" Version="6.0.2" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.4" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.56.0" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.56.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.206-beta" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.2" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.369" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Services.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="16.205.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Logging\DevHome.Logging.csproj" />
<ProjectReference Include="..\Telemetry\AzureExtension.Telemetry.csproj" />
<ProjectReference Include="..\Logging\DevHome.Logging.csproj" />
<ProjectReference Include="..\Telemetry\AzureExtension.Telemetry.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -180,39 +181,8 @@
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<DefineConstants Condition="'$(BuildRing)'=='Canary'">$(DefineConstants);CANARY_BUILD</DefineConstants>
<DefineConstants Condition="'$(BuildRing)'=='Stable'">$(DefineConstants);STABLE_BUILD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions src/AzureExtension/Client/AzureClientHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.TeamFoundation.SourceControl.WebApi;
using Microsoft.TeamFoundation.WorkItemTracking.WebApi;
Expand Down
16 changes: 8 additions & 8 deletions src/AzureExtension/Client/AzureClientProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.Identity.Client;
using Microsoft.VisualStudio.Services.Common;
Expand Down Expand Up @@ -44,12 +44,12 @@ public class AzureClientProvider
}
catch (MsalServiceException ex)
{
Log.Logger()?.ReportError($"Unable to get credentials for developerId: failed with msal service error: {ex}");
Log.Logger()?.ReportError($"Unable to get credentials for developerId: failed with MSAL service error: {ex}");
return null;
}
catch (MsalClientException ex)
{
Log.Logger()?.ReportError($"Unable to get credentials for developerId: failed with msal client error: {ex}");
Log.Logger()?.ReportError($"Unable to get credentials for developerId: failed with MSAL client error: {ex}");
return null;
}
catch (Exception ex)
Expand Down Expand Up @@ -105,12 +105,12 @@ public static ConnectionResult CreateVssConnection(Uri uri, DeveloperId.Develope
}
catch (MsalServiceException ex)
{
Log.Logger()?.ReportError($"AcquireDeveloperAccountToken failed with msal service error: {ex}");
Log.Logger()?.ReportError($"AcquireDeveloperAccountToken failed with MSAL service error: {ex}");
return new ConnectionResult(ResultType.Failure, ErrorType.MsalServiceError, false, ex);
}
catch (MsalClientException ex)
{
Log.Logger()?.ReportError($"AcquireDeveloperAccountToken failed with msal client error: {ex}");
Log.Logger()?.ReportError($"AcquireDeveloperAccountToken failed with MSAL client error: {ex}");
return new ConnectionResult(ResultType.Failure, ErrorType.MsalClientError, false, ex);
}
catch (Exception ex)
Expand Down Expand Up @@ -143,9 +143,9 @@ public static ConnectionResult CreateVssConnection(Uri uri, DeveloperId.Develope
}

/// <summary>
/// Gets the azure devops connection for the specified developer id.
/// Gets the Azure DevOps connection for the specified developer id.
/// </summary>
/// <param name="uri">The uri to an azure devops resource.</param>
/// <param name="uri">The uri to an Azure DevOps resource.</param>
/// <param name="developerId">The developer to authenticate with.</param>
/// <returns>An authorized connection to the resource.</returns>
/// <exception cref="ArgumentException">If the azure uri is not valid.</exception>
Expand Down
24 changes: 12 additions & 12 deletions src/AzureExtension/Client/AzureHostType.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.

namespace DevHomeAzureExtension.Client;

public enum AzureHostType
{
Unknown,
NotHosted,
Legacy,
Modern,
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace DevHomeAzureExtension.Client;

public enum AzureHostType
{
Unknown,
NotHosted,
Legacy,
Modern,
}
4 changes: 2 additions & 2 deletions src/AzureExtension/Client/AzureUri.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace DevHomeAzureExtension.Client;

Expand Down
4 changes: 2 additions & 2 deletions src/AzureExtension/Client/ConnectionResult.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.VisualStudio.Services.WebApi;

Expand Down
4 changes: 2 additions & 2 deletions src/AzureExtension/Client/ErrorType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace DevHomeAzureExtension.Client;

Expand Down
Loading

0 comments on commit 2c9ef0c

Please sign in to comment.