Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

公式情報取得時にidStringをアップデートするように #28

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

slime-hatena
Copy link
Member

これが変わることもある(かわらないで><)

This pull request includes changes to the OngekiMuseumApi project to improve the handling and logging of the IdString property in the OfficialMusic model and its associated service.

Changes to OfficialMusic model and service:

これが変わることもある
@slime-hatena slime-hatena added the enhancement New feature or request label Mar 21, 2025
@slime-hatena slime-hatena requested a review from Copilot March 21, 2025 15:10
@slime-hatena slime-hatena self-assigned this Mar 21, 2025
@slime-hatena slime-hatena merged commit 30c0ef6 into develop Mar 21, 2025
2 checks passed
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the OfficialMusic model and the OfficialMusicService to allow and log updates to the IdString property.

  • Modified the OfficialMusic model to change IdString from an init-only property to a settable property.
  • Updated the FetchAndSaveOfficialMusicAsync method to log and update IdString when discrepancies are detected.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
OngekiMuseumApi/OngekiMuseumApi/Services/OfficialMusicService.cs Added logic to detect changes and log updates for IdString.
OngekiMuseumApi/OngekiMuseumApi/Models/OfficialMusic.cs Changed IdString property to allow modifications.
Comments suppressed due to low confidence (1)

OngekiMuseumApi/OngekiMuseumApi/Services/OfficialMusicService.cs:216

  • Consider adding tests to verify the new logic for updating and logging the IdString property to ensure it handles empty and null values as expected.
if (!string.Equals(existingMusic.IdString, NullIfEmpty(musicJson.id)))

@github-actions github-actions bot mentioned this pull request Mar 21, 2025
Copy link

Qodana for .NET

77 new problems were found

Inspection name Severity Problems
Redundant anonymous type property explicit name 🔶 Warning 2
Redundant using directive 🔶 Warning 2
Non-accessed field (private accessibility) 🔶 Warning 1
Auto-property accessor is never used (private accessibility) 🔶 Warning 1
Auto-property can be made get-only (non-private accessibility) ◽️ Notice 17
Use preferred 'var' style (for built-in types) ◽️ Notice 14
Use preferred style for trailing comma before new line in multiline lists ◽️ Notice 8
RoslynAnalyzers Template should be a static expression ◽️ Notice 8
Invert 'if' statement to reduce nesting ◽️ Notice 5
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used ◽️ Notice 3
Type member is never used (non-private accessibility) ◽️ Notice 3
RoslynAnalyzers Mark members as static ◽️ Notice 2
Member can be made static (shared) (private accessibility) ◽️ Notice 2
Type member is never accessed via base type (non-private accessibility) ◽️ Notice 2
Remove redundant parentheses ◽️ Notice 1
RoslynAnalyzers Use char overload ◽️ Notice 1
RoslynAnalyzers Cache and reuse 'JsonSerializerOptions' instances ◽️ Notice 1
Convert local variable or field into constant (private accessibility) ◽️ Notice 1
Redundant 'else' keyword ◽️ Notice 1
Redundant string interpolation ◽️ Notice 1
Literal length can be reduced by using verbatim string ◽️ Notice 1

☁️ View the detailed Qodana report

Detected 134 dependencies

Third-party software list

This page lists the third-party software dependencies used in OngekiMuseumApi

Dependency Version Licenses
AspNetCore.HealthChecks.Uris 8.0.1 Apache-2.0
Aspire.Dashboard.Sdk.linux-x64 9.0.0 MIT
Aspire.Hosting.AppHost 9.0.0 MIT
Aspire.Hosting.Orchestration.linux-x64 9.0.0 MIT
Aspire.Hosting 9.0.0 MIT
EFCore.NamingConventions 9.0.0 Apache-2.0
Fractions 7.3.0 BSD-2-Clause
Google.Protobuf 3.22.5 BSD-3-Clause
Google.Protobuf 3.28.2 BSD-3-Clause
Grpc.AspNetCore.Server.ClientFactory 2.66.0 Apache-2.0
Grpc.AspNetCore.Server 2.66.0 Apache-2.0
Grpc.AspNetCore 2.66.0 Apache-2.0
Grpc.Core.Api 2.52.0 Apache-2.0
Grpc.Core.Api 2.66.0 Apache-2.0
Grpc.Net.Client 2.52.0 Apache-2.0
Grpc.Net.Client 2.66.0 Apache-2.0
Grpc.Net.ClientFactory 2.66.0 Apache-2.0
Grpc.Net.Common 2.52.0 Apache-2.0
Grpc.Net.Common 2.66.0 Apache-2.0
Grpc.Tools 2.67.0 Apache-2.0
Humanizer.Core 2.14.1 MIT
IdentityModel.OidcClient 5.2.1 Apache-2.0
IdentityModel 5.2.0 Apache-2.0
Json.More.Net 2.0.1.2 MIT
JsonPatch.Net 3.1.1 MIT
JsonPointer.Net 5.0.2 MIT
KubernetesClient 15.0.1 Apache-2.0
Microsoft.AspNetCore.OpenApi 9.0.1 MIT
Microsoft.Bcl.AsyncInterfaces 7.0.0 MIT
Microsoft.Build.Framework 17.8.3 MIT
Microsoft.Build.Locator 1.7.8 MIT
Microsoft.CodeAnalysis.Analyzers 3.3.4 MIT
Microsoft.CodeAnalysis.CSharp.Workspaces 4.8.0 MIT
Microsoft.CodeAnalysis.CSharp 4.8.0 MIT
Microsoft.CodeAnalysis.Common 4.8.0 MIT
Microsoft.CodeAnalysis.Workspaces.Common 4.8.0 MIT
Microsoft.CodeAnalysis.Workspaces.MSBuild 4.8.0 MIT
Microsoft.EntityFrameworkCore.Abstractions 9.0.2 MIT
Microsoft.EntityFrameworkCore.Analyzers 9.0.2 MIT
Microsoft.EntityFrameworkCore.Design 9.0.2 MIT
Microsoft.EntityFrameworkCore.Relational 9.0.2 MIT
Microsoft.EntityFrameworkCore 9.0.2 MIT
Microsoft.Extensions.AmbientMetadata.Application 9.0.0 MIT
Microsoft.Extensions.Caching.Abstractions 9.0.2 MIT
Microsoft.Extensions.Caching.Memory 9.0.2 MIT
Microsoft.Extensions.Compliance.Abstractions 9.0.0 MIT
Microsoft.Extensions.Configuration.Abstractions 9.0.0 MIT
Microsoft.Extensions.Configuration.Abstractions 9.0.2 MIT
Microsoft.Extensions.Configuration.Binder 9.0.0 MIT
Microsoft.Extensions.Configuration.CommandLine 9.0.0 MIT
Microsoft.Extensions.Configuration.EnvironmentVariables 9.0.0 MIT
Microsoft.Extensions.Configuration.FileExtensions 9.0.0 MIT
Microsoft.Extensions.Configuration.Json 9.0.0 MIT
Microsoft.Extensions.Configuration.UserSecrets 9.0.0 MIT
Microsoft.Extensions.Configuration 9.0.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 9.0.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 9.0.2 MIT
Microsoft.Extensions.DependencyInjection.AutoActivation 9.0.0 MIT
Microsoft.Extensions.DependencyInjection 9.0.0 MIT
Microsoft.Extensions.DependencyInjection 9.0.2 MIT
Microsoft.Extensions.DependencyModel 9.0.2 MIT
Microsoft.Extensions.Diagnostics.Abstractions 9.0.0 MIT
Microsoft.Extensions.Diagnostics.ExceptionSummarization 9.0.0 MIT
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions 9.0.0 MIT
Microsoft.Extensions.Diagnostics.HealthChecks 9.0.0 MIT
Microsoft.Extensions.Diagnostics 9.0.0 MIT
Microsoft.Extensions.Features 8.0.11 MIT
Microsoft.Extensions.FileProviders.Abstractions 9.0.0 MIT
Microsoft.Extensions.FileProviders.Physical 9.0.0 MIT
Microsoft.Extensions.FileSystemGlobbing 9.0.0 MIT
Microsoft.Extensions.Hosting.Abstractions 9.0.0 MIT
Microsoft.Extensions.Hosting 9.0.0 MIT
Microsoft.Extensions.Http.Diagnostics 9.0.0 MIT
Microsoft.Extensions.Http.Resilience 9.0.0 MIT
Microsoft.Extensions.Http 9.0.0 MIT
Microsoft.Extensions.Logging.Abstractions 9.0.0 MIT
Microsoft.Extensions.Logging.Abstractions 9.0.2 MIT
Microsoft.Extensions.Logging.Configuration 9.0.0 MIT
Microsoft.Extensions.Logging.Console 9.0.0 MIT
Microsoft.Extensions.Logging.Debug 9.0.0 MIT
Microsoft.Extensions.Logging.EventLog 9.0.0 MIT
Microsoft.Extensions.Logging.EventSource 9.0.0 MIT
Microsoft.Extensions.Logging 9.0.0 MIT
Microsoft.Extensions.Logging 9.0.2 MIT
Microsoft.Extensions.ObjectPool 9.0.0 MIT
Microsoft.Extensions.Options.ConfigurationExtensions 9.0.0 MIT
Microsoft.Extensions.Options 9.0.0 MIT
Microsoft.Extensions.Options 9.0.2 MIT
Microsoft.Extensions.Primitives 9.0.0 MIT
Microsoft.Extensions.Primitives 9.0.2 MIT
Microsoft.Extensions.Resilience 9.0.0 MIT
Microsoft.Extensions.ServiceDiscovery.Abstractions 9.0.0 MIT
Microsoft.Extensions.ServiceDiscovery 9.0.0 MIT
Microsoft.Extensions.Telemetry.Abstractions 9.0.0 MIT
Microsoft.Extensions.Telemetry 9.0.0 MIT
Microsoft.IO.RecyclableMemoryStream 3.0.0 MIT
Microsoft.IdentityModel.Abstractions 7.1.2 MIT
Microsoft.IdentityModel.JsonWebTokens 7.1.2 MIT
Microsoft.IdentityModel.Logging 7.1.2 MIT
Microsoft.IdentityModel.Tokens 7.1.2 MIT
Microsoft.OpenApi 1.6.17 MIT
Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.21.0 MIT
Mono.TextTemplating 3.0.0 MIT
MySqlConnector 2.4.0 MIT
OpenTelemetry.Api.ProviderBuilderExtensions 1.9.0 Apache-2.0
OpenTelemetry.Api 1.9.0 Apache-2.0
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.9.0 Apache-2.0
OpenTelemetry.Extensions.Hosting 1.9.0 Apache-2.0
OpenTelemetry.Instrumentation.AspNetCore 1.9.0 Apache-2.0
OpenTelemetry.Instrumentation.Http 1.9.0 Apache-2.0
OpenTelemetry.Instrumentation.Runtime 1.9.0 Apache-2.0
OpenTelemetry 1.9.0 Apache-2.0
Polly.Core 8.4.2 BSD-3-Clause
Polly.Extensions 8.4.2 BSD-3-Clause
Polly.RateLimiting 8.4.2 BSD-3-Clause
System.CodeDom 6.0.0 MIT
System.Collections.Immutable 7.0.0 MIT
System.Composition.AttributedModel 7.0.0 MIT
System.Composition.Convention 7.0.0 MIT
System.Composition.Hosting 7.0.0 MIT
System.Composition.Runtime 7.0.0 MIT
System.Composition.TypedParts 7.0.0 MIT
System.Composition 7.0.0 MIT
System.Diagnostics.DiagnosticSource 8.0.0 MIT
System.Diagnostics.EventLog 9.0.0 MIT
System.IO.Pipelines 7.0.0 MIT
System.IdentityModel.Tokens.Jwt 7.1.2 MIT
System.Memory 4.5.3 MIT
System.Reflection.Metadata 7.0.0 MIT
System.Runtime.CompilerServices.Unsafe 6.0.0 MIT
System.Text.Json 9.0.2 MIT
System.Threading.Channels 7.0.0 MIT
System.Threading.RateLimiting 8.0.0 MIT
YamlDotNet 16.0.0 MIT
Contact Qodana team

Contact us at qodana-support@jetbrains.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant