Update style, workflows, structure, and dependencies - #199
Merged
Merged
Conversation
.editorconfig: Add new C# style/formatting rules (implicit lambdas, unbound generics in nameof, static anonymous functions). GitHub Actions: Switch publish workflow to NuGet OIDC login, removing static API key. Solution: Refactor SimpleAuthentication.slnx to use lowercase folder names and group src projects under /src/. Dependencies: Upgrade Nerdbank.GitVersioning to 3.10.94 in Directory.Build.props. Code: Refactor PermissionAttribute to use a primary constructor and file-scoped namespace. Packages: Update Microsoft.AspNetCore.Authentication.JwtBearer references in SimpleAuthentication.Abstractions.csproj to latest patch versions for .NET 8, 9, and 10.
There was a problem hiding this comment.
🟡 Changes recommended
PermissionAttribute uses params on a class primary constructor, which is not supported and will fail compilation / break intended attribute usage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates repository-wide style/workflow configuration and modernizes several project artifacts (solution structure, dependency versions, and a small C# refactor) to align with newer tooling and security practices.
Changes:
- Updates formatting/style rules in
.editorconfigand refactorsPermissionAttribute. - Switches the NuGet publish workflow to use OIDC-based login instead of a long-lived API key secret.
- Adjusts solution organization and bumps package/dependency versions (JwtBearer per TFM; Nerdbank.GitVersioning).
File summaries
| File | Description |
|---|---|
src/SimpleAuthentication.Abstractions/SimpleAuthentication.Abstractions.csproj |
Updates JwtBearer package patch versions per target framework. |
src/SimpleAuthentication.Abstractions/Permissions/PermissionAttribute.cs |
Refactors PermissionAttribute to a primary-constructor form (currently introduces a compile issue). |
src/Directory.Build.props |
Bumps Nerdbank.GitVersioning version. |
SimpleAuthentication.slnx |
Reorganizes solution folders (adds /src/ grouping and lowercases /samples/). |
.github/workflows/publish_abstractions.yml |
Switches publishing to NuGet OIDC login and uses the short-lived key output for push. |
.editorconfig |
Adds new C# style preferences (static anonymous functions, implicit lambdas, unbound generics in nameof). |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| public class PermissionAttribute(params string[] permissions) : AuthorizeAttribute(string.Join(",", permissions)) | ||
| { | ||
| } | ||
| public class PermissionAttribute(params string[] permissions) : AuthorizeAttribute(string.Join(",", permissions)); No newline at end of file |
Comment on lines
52
to
+53
| - name: Publish on NuGet | ||
| run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json | ||
| run: dotnet nuget push *.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.editorconfig: Add new C# style/formatting rules (implicit lambdas, unbound generics in nameof, static anonymous functions).
GitHub Actions: Switch publish workflow to NuGet OIDC login, removing static API key.
Solution: Refactor SimpleAuthentication.slnx to use lowercase folder names and group src projects under /src/.
Dependencies: Upgrade Nerdbank.GitVersioning to 3.10.94 in Directory.Build.props.
Code: Refactor PermissionAttribute to use a primary constructor and file-scoped namespace.
Packages: Update Microsoft.AspNetCore.Authentication.JwtBearer references in SimpleAuthentication.Abstractions.csproj to latest patch versions for .NET 8, 9, and 10.