From 5e29ac84dc32e913dd81bb5989285f20099df9fd Mon Sep 17 00:00:00 2001 From: Xiaoyun Zhang Date: Mon, 29 Apr 2024 13:27:57 -0700 Subject: [PATCH] [.Net] fix code ql for dotnet build && update trigger for dotnet workflow (#2529) * fix formatting * update dotnet build pipieline --- .github/workflows/dotnet-build.yml | 4 ++-- .github/workflows/dotnet-release.yml | 1 - dotnet/Directory.Build.props | 2 +- dotnet/global.json | 2 +- dotnet/nuget/nuget-package.props | 4 ++-- .../Example12_TwoAgent_Fill_Application.cs | 6 +++--- dotnet/src/AutoGen.Core/AutoGen.Core.csproj | 2 +- dotnet/src/AutoGen.Core/GroupChat/Graph.cs | 2 +- .../AutoGen.DotnetInteractive.csproj | 2 +- dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj | 2 +- dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj | 2 +- dotnet/src/AutoGen.Mistral/DTOs/ChatCompletionResponse.cs | 5 ++++- dotnet/src/AutoGen.Mistral/DTOs/Error.cs | 5 ++++- dotnet/src/AutoGen.Mistral/DTOs/Model.cs | 5 ++++- dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj | 2 +- .../AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj | 2 +- .../AutoGen.SourceGenerator/AutoGen.SourceGenerator.csproj | 2 +- dotnet/src/AutoGen/AutoGen.csproj | 2 +- 18 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index e337f7143..332e656c9 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -6,11 +6,11 @@ name: dotnet-ci on: workflow_dispatch: pull_request: - branches: [ "dotnet" ] + branches: [ "main" ] paths: - 'dotnet/**' push: - branches: [ "dotnet" ] + branches: [ "main" ] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 84b1f43b7..b512b4c16 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -8,7 +8,6 @@ on: push: branches: - dotnet/release/** - - dotnet/release concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} diff --git a/dotnet/Directory.Build.props b/dotnet/Directory.Build.props index 03a11d92c..5641c6cac 100644 --- a/dotnet/Directory.Build.props +++ b/dotnet/Directory.Build.props @@ -18,6 +18,6 @@ - $(MSBuildThisFileDirectory)../ + $(MSBuildThisFileDirectory) \ No newline at end of file diff --git a/dotnet/global.json b/dotnet/global.json index a93054a45..a604954f9 100644 --- a/dotnet/global.json +++ b/dotnet/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.101", + "version": "8.0.104", "rollForward": "latestMinor" } } \ No newline at end of file diff --git a/dotnet/nuget/nuget-package.props b/dotnet/nuget/nuget-package.props index 237fa96bc..c6ddf3891 100644 --- a/dotnet/nuget/nuget-package.props +++ b/dotnet/nuget/nuget-package.props @@ -44,8 +44,8 @@ - - + + diff --git a/dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cs b/dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cs index c5e6773d0..b622a3e64 100644 --- a/dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cs +++ b/dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Example11_TwoAgent_Fill_Application.cs +// Example12_TwoAgent_Fill_Application.cs using System.Text; -using AutoGen.OpenAI; using AutoGen.Core; -using Azure.AI.OpenAI; +using AutoGen.OpenAI; using AutoGen.OpenAI.Extension; +using Azure.AI.OpenAI; namespace AutoGen.BasicSample; diff --git a/dotnet/src/AutoGen.Core/AutoGen.Core.csproj b/dotnet/src/AutoGen.Core/AutoGen.Core.csproj index 018cd23a4..409b6bc1a 100644 --- a/dotnet/src/AutoGen.Core/AutoGen.Core.csproj +++ b/dotnet/src/AutoGen.Core/AutoGen.Core.csproj @@ -4,7 +4,7 @@ AutoGen.Core - + diff --git a/dotnet/src/AutoGen.Core/GroupChat/Graph.cs b/dotnet/src/AutoGen.Core/GroupChat/Graph.cs index 483ce63be..78d925086 100644 --- a/dotnet/src/AutoGen.Core/GroupChat/Graph.cs +++ b/dotnet/src/AutoGen.Core/GroupChat/Graph.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Workflow.cs +// Graph.cs using System; using System.Collections.Generic; diff --git a/dotnet/src/AutoGen.DotnetInteractive/AutoGen.DotnetInteractive.csproj b/dotnet/src/AutoGen.DotnetInteractive/AutoGen.DotnetInteractive.csproj index e17356994..57fcb1fce 100644 --- a/dotnet/src/AutoGen.DotnetInteractive/AutoGen.DotnetInteractive.csproj +++ b/dotnet/src/AutoGen.DotnetInteractive/AutoGen.DotnetInteractive.csproj @@ -8,7 +8,7 @@ true - + diff --git a/dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj b/dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj index b738fe02b..f45a2f7eb 100644 --- a/dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj +++ b/dotnet/src/AutoGen.LMStudio/AutoGen.LMStudio.csproj @@ -5,7 +5,7 @@ AutoGen.LMStudio - + diff --git a/dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj b/dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj index f7de19ca0..f1bb8e0af 100644 --- a/dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj +++ b/dotnet/src/AutoGen.Mistral/AutoGen.Mistral.csproj @@ -5,7 +5,7 @@ AutoGen.Mistral - + diff --git a/dotnet/src/AutoGen.Mistral/DTOs/ChatCompletionResponse.cs b/dotnet/src/AutoGen.Mistral/DTOs/ChatCompletionResponse.cs index 58dcf5297..ff241f8d3 100644 --- a/dotnet/src/AutoGen.Mistral/DTOs/ChatCompletionResponse.cs +++ b/dotnet/src/AutoGen.Mistral/DTOs/ChatCompletionResponse.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// Copyright (c) Microsoft Corporation. All rights reserved. +// ChatCompletionResponse.cs + +using System.Collections.Generic; using System.Text.Json.Serialization; namespace AutoGen.Mistral; diff --git a/dotnet/src/AutoGen.Mistral/DTOs/Error.cs b/dotnet/src/AutoGen.Mistral/DTOs/Error.cs index ed04721c6..77eb2d341 100644 --- a/dotnet/src/AutoGen.Mistral/DTOs/Error.cs +++ b/dotnet/src/AutoGen.Mistral/DTOs/Error.cs @@ -1,4 +1,7 @@ -using System.Text.Json.Serialization; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Error.cs + +using System.Text.Json.Serialization; namespace AutoGen.Mistral { diff --git a/dotnet/src/AutoGen.Mistral/DTOs/Model.cs b/dotnet/src/AutoGen.Mistral/DTOs/Model.cs index 2d653f718..915d2f737 100644 --- a/dotnet/src/AutoGen.Mistral/DTOs/Model.cs +++ b/dotnet/src/AutoGen.Mistral/DTOs/Model.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Model.cs + +using System; using System.Text.Json.Serialization; namespace AutoGen.Mistral; diff --git a/dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj b/dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj index 182d11222..7220cfe5c 100644 --- a/dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj +++ b/dotnet/src/AutoGen.OpenAI/AutoGen.OpenAI.csproj @@ -4,7 +4,7 @@ AutoGen.OpenAI - + diff --git a/dotnet/src/AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj b/dotnet/src/AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj index 70d750067..06c464fc9 100644 --- a/dotnet/src/AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj +++ b/dotnet/src/AutoGen.SemanticKernel/AutoGen.SemanticKernel.csproj @@ -5,7 +5,7 @@ AutoGen.SemanticKernel - + diff --git a/dotnet/src/AutoGen.SourceGenerator/AutoGen.SourceGenerator.csproj b/dotnet/src/AutoGen.SourceGenerator/AutoGen.SourceGenerator.csproj index a9d276631..455816072 100644 --- a/dotnet/src/AutoGen.SourceGenerator/AutoGen.SourceGenerator.csproj +++ b/dotnet/src/AutoGen.SourceGenerator/AutoGen.SourceGenerator.csproj @@ -13,7 +13,7 @@ $(DefineConstants);LAUNCH_DEBUGGER - + diff --git a/dotnet/src/AutoGen/AutoGen.csproj b/dotnet/src/AutoGen/AutoGen.csproj index 4d0d791eb..2b9aaed6d 100644 --- a/dotnet/src/AutoGen/AutoGen.csproj +++ b/dotnet/src/AutoGen/AutoGen.csproj @@ -4,7 +4,7 @@ AutoGen - +