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

Update to .NET 9 SDK #26

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Update to .NET 9 SDK #26

merged 5 commits into from
Dec 11, 2024

Conversation

Shane32
Copy link
Owner

@Shane32 Shane32 commented Dec 11, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new GitHub Actions workflow for code formatting checks.
    • Updated workflows for building, publishing, and testing to improve automation and dependency management.
  • Bug Fixes

    • Removed unnecessary using statements and simplified class structures for better readability and maintainability.
  • Documentation

    • Updated .editorconfig file to enforce new code style and formatting conventions.
  • Chores

    • Added a global.json file to specify the .NET SDK version for the project.
    • Updated project properties and package references for compatibility and performance improvements.

@Shane32 Shane32 self-assigned this Dec 11, 2024
Copy link

coderabbitai bot commented Dec 11, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes in this pull request include updates to various configuration files, GitHub Actions workflows, and C# source files. Key modifications involve enforcing new code style guidelines in the .editorconfig, enhancing GitHub workflows for building, formatting, and testing code, and simplifying several classes and methods in the source code. Additionally, a new global.json file has been added to specify the .NET SDK version, and various project properties have been updated to reflect changes in dependencies and framework targets.

Changes

File Change Summary
.editorconfig Updated code style and formatting conventions for C# projects, including line length, namespace declarations, and naming conventions.
.github/workflows/build.yml Modified to use a generic .NET Core SDK version and updated NuGet package source and version suffix.
.github/workflows/format.yml Introduced a new workflow for checking code formatting on pull requests.
.github/workflows/publish.yml Updated to trigger on new releases and utilize the global.json for SDK versioning.
.github/workflows/test.yml Updated SDK version handling and modified code coverage reporting steps.
Directory.Build.props Changed AnalysisMode and updated GraphQL package version.
GraphQL.DI.sln Added global.json and format.yml workflow.
Sample/Pages/Index.cshtml.cs Removed unnecessary using statements and simplified IndexModel class.
Sample/Pages/Privacy.cshtml Removed UTF-8 BOM character for improved readability.
Sample/Pages/Privacy.cshtml.cs Simplified PrivacyModel class by removing logger field and constructor.
Sample/Startup.cs Updated service configurations and simplified conditional logic.
global.json Specified .NET SDK version and rollForward behavior.
src/GraphQL.DI/DIGraphAttribute.cs Simplified logic in the Modify method.
src/GraphQL.DI/DIGraphTypeMappingProvider.cs Made class sealed and updated method for handling non-input types.
src/GraphQL.DI/DIObjectGraphType.cs Optimized code and improved error handling.
src/GraphQL.DI/Shane32.GraphQL.DI.csproj Minor change to TargetFramework property.
src/Tests/DIObjectGraphBaseTests.cs Updated mock object initialization and assertions.
src/Tests/DIObjectGraphTypeTests/Field.cs Added new test cases for various scenarios.
src/Tests/Execution/GraphQLBuilderTests.cs Updated mock initialization and registration methods for testing.
src/Tests/Tests.csproj Updated target framework, removed root namespace, and modified package references.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHubActions
    participant NuGetRegistry
    participant Codebase

    Developer->>GitHubActions: Create Pull Request
    GitHubActions->>Codebase: Checkout Code
    GitHubActions->>Codebase: Run Formatting Check
    alt Formatting Issues Found
        GitHubActions-->>Developer: Request Formatting Fix
    else No Issues
        GitHubActions->>NuGetRegistry: Build and Publish Package
        GitHubActions->>Codebase: Run Tests
        GitHubActions->>NuGetRegistry: Upload Packages
    end
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b637886 and d0cf3e5.

📒 Files selected for processing (20)
  • .editorconfig (6 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/format.yml (1 hunks)
  • .github/workflows/publish.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • Directory.Build.props (1 hunks)
  • GraphQL.DI.sln (2 hunks)
  • Sample/Pages/Index.cshtml.cs (1 hunks)
  • Sample/Pages/Privacy.cshtml (1 hunks)
  • Sample/Pages/Privacy.cshtml.cs (1 hunks)
  • Sample/Startup.cs (2 hunks)
  • global.json (1 hunks)
  • src/GraphQL.DI/DIGraphAttribute.cs (1 hunks)
  • src/GraphQL.DI/DIGraphTypeMappingProvider.cs (1 hunks)
  • src/GraphQL.DI/DIObjectGraphType.cs (2 hunks)
  • src/GraphQL.DI/Shane32.GraphQL.DI.csproj (1 hunks)
  • src/Tests/DIObjectGraphBaseTests.cs (1 hunks)
  • src/Tests/DIObjectGraphTypeTests/Field.cs (2 hunks)
  • src/Tests/Execution/GraphQLBuilderTests.cs (1 hunks)
  • src/Tests/Tests.csproj (1 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Coverage Report

Totals Coverage
Statements: 95.65% ( 132 / 138 )
Methods: 87.5% ( 42 / 48 )

@Shane32 Shane32 merged commit 6fa9901 into master Dec 11, 2024
5 of 6 checks passed
@Shane32 Shane32 deleted the factory branch December 11, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant