Skip to content

Commit

Permalink
Release 1.1.2.0
Browse files Browse the repository at this point in the history
修正呼叫 PermissionsApi 的更新分享連結權限流程失敗

bug: #19
  • Loading branch information
ChengYen-Tang committed Dec 21, 2020
1 parent 0085d05 commit 16198ed
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["MicrosoftGraphAPIBot/MicrosoftGraphAPIBot.csproj", "MicrosoftGraphAPIBot/"]
RUN dotnet restore "MicrosoftGraphAPIBot/MicrosoftGraphAPIBot.csproj"
Expand Down
2 changes: 1 addition & 1 deletion MicrosoftGraphAPIBot/MicrosoftGraph/PermissionsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private static async Task<Permission> GetShareLinkAsync(IGraphServiceClient grap
/// <returns></returns>
private static async Task<Permission> UpdateShareLinkAsync(IGraphServiceClient graphClient, string itemId, string linkId)
{
var permission = new Permission { Roles = new List<String>{ "write" }};
var permission = new Permission { Roles = new List<String>{ "write" }, ExpirationDateTime = DateTimeOffset.MaxValue};

Permission item = await graphClient.Me.Drive.Items[itemId].Permissions[linkId]
.Request()
Expand Down
38 changes: 19 additions & 19 deletions MicrosoftGraphAPIBot/MicrosoftGraphAPIBot.csproj
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="HangFire.Core" Version="1.7.14" />
<PackageReference Include="HangFire.SqlServer" Version="1.7.14" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.0">
<PackageReference Include="HangFire.Core" Version="1.7.18" />
<PackageReference Include="HangFire.SqlServer" Version="1.7.18" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VersionCheckAnalyzer" Version="3.3.0">
<PackageReference Include="Microsoft.CodeAnalysis.VersionCheckAnalyzer" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.8">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="5.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.8" />
<PackageReference Include="Microsoft.Graph" Version="3.15.0" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="3.3.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
<PackageReference Include="Microsoft.Graph" Version="3.21.0" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog.Extensions.Logging.File" Version="2.0.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.13.1.21947">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.15.0.24505">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Async" Version="4.1.1" />
<PackageReference Include="System.Linq.Async" Version="5.0.0" />
<PackageReference Include="Telegram.Bot" Version="15.7.1" />
<PackageReference Include="Text.Analyzers" Version="2.6.4">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion MicrosoftGraphAPIBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
if (!Utils.CheckConfig(hostContext.Configuration))
throw new BotException("Configuration file check failed.");
string DBConnection = Utils.GetDBConnection(hostContext.Configuration);
services.AddDbContext<BotDbContext>(options =>
services.AddDbContextPool<BotDbContext>(options =>
{
options.UseSqlServer(DBConnection);
});
Expand Down
8 changes: 4 additions & 4 deletions MicrosoftGraphBotTests/MicrosoftGraphBotTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,9 +11,9 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
Expand Down
10 changes: 10 additions & 0 deletions ReleaseNotes/1.1.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 新功能:

## 變更:
1. 專案更新,使用 .Net 5
1. 專案套件更新

## Bug 修復:
呼叫 **PermissionsApi 的更新分享連結權限流程**失敗 [(#19)](https://github.com/NTUT-SELab/MicrosoftGraphBot/issues/19)

## 文檔:
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
buildConfiguration: 'Release'
version: '1.1.1.0'
version: '1.1.2.0'

stages:
- stage: Build_and_Test
Expand Down

0 comments on commit 16198ed

Please sign in to comment.