diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5a0bd6c..8f4c0de 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -34,6 +34,7 @@ Available VS Code tasks (use via `run_task` tool): - `.Net Format`: Verify formatting and style (must pass) - `CSharpier Format`: Auto-format code with CSharpier - `.Net Tool Update`: Update dotnet tools +- `.Net Outdated Upgrade`: Upgrade outdated NuGet dependencies (interactive prompt) - `Husky.Net Run`: Run pre-commit hooks manually ## Coding Standards and Conventions @@ -315,7 +316,7 @@ The project includes comprehensive `.editorconfig` settings that enforce: 3. **Before committing**: - Run `.Net Format` task to verify compliance - Husky hooks will run automatically -4. **Dependency updates**: Use `dotnet outdated --upgrade:prompt` regularly +4. **Dependency updates**: Run `.Net Outdated Upgrade` task (`dotnet outdated --upgrade:prompt`) regularly 5. **Testing**: Run tests via VS Code test explorer or `dotnet test` ## Reference Links diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 8f90e11..8ce8d48 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -35,7 +35,7 @@ jobs: merge-codegen: name: Merge codegen pull request job runs-on: ubuntu-latest - if: github.actor == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.ref == 'codegen' && github.event.pull_request.head.repo.full_name == github.repository && contains(github.event.pull_request.labels.*.name, 'automated-codegen') permissions: contents: write pull-requests: write diff --git a/.github/workflows/run-codegen-pull-request-task.yml b/.github/workflows/run-codegen-pull-request-task.yml index 963ceae..632e3c4 100644 --- a/.github/workflows/run-codegen-pull-request-task.yml +++ b/.github/workflows/run-codegen-pull-request-task.yml @@ -44,3 +44,4 @@ jobs: commit-message: 'Update codegen files' delete-branch: true sign-commits: true + labels: automated-codegen diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 2846d7f..9ce7d4b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -99,7 +99,7 @@ "command": "dotnet", "args": [ "outdated", - "--upgrade:Prompt" + "--upgrade:prompt" ], "problemMatcher": [ "$msCompile" diff --git a/AGENTS.md b/AGENTS.md index b2eea8d..7b31ff9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,25 +2,25 @@ **ProjectTemplate** is a C# .NET template project demonstrating best practices. Developers use this as a baseline to create their own projects. -For comprehensive coding standards and detailed conventions, refer to [`.github/copilot-instructions.md`](./.github/copilot-instructions.md) and [`CODESTYLE.md`](./CODESTYLE.md). +For comprehensive coding standards and detailed conventions, refer to [`.github/copilot-instructions.md`](./.github/copilot-instructions.md) and [`CODESTYLE.md`](./CODESTYLE.md). ## Key Requirements for All Projects Derived from This Template -### Build & Quality Standards - -- **Zero Warnings Policy**: All builds must complete without errors or warnings - - Use `CSharpier Format`, `.Net Format`, and `Husky.Net Run` tasks - -- **Code Analysis**: Enable all .NET analyzers - - `true` - - `latest-all` - -### Development Environment - -- Target latest .NET SDK (currently .NET 10 with C# 14) -- Support Visual Studio Code (`.code-workspace`) and Visual Studio Community (`.slnx`) -- Support Linux, Windows, and macOS with correct line endings and permissions -- Use `.editorconfig` for style enforcement +### Build & Quality Standards + +- **Zero Warnings Policy**: All builds must complete without errors or warnings + - Use `CSharpier Format`, `.Net Format`, and `Husky.Net Run` tasks + +- **Code Analysis**: Enable all .NET analyzers + - `true` + - `latest-all` + +### Development Environment + +- Target latest .NET SDK (currently .NET 10 with C# 14) +- Support Visual Studio Code (`.code-workspace`) and Visual Studio Community (`.slnx`) +- Support Linux, Windows, and macOS with correct line endings and permissions +- Use `.editorconfig` for style enforcement ### Project Structure @@ -37,14 +37,14 @@ For comprehensive coding standards and detailed conventions, refer to [`.github/ - Follow Arrange-Act-Assert pattern - Test naming: `MethodName_Scenario_ExpectedBehavior()` -## Authoritative References - -For detailed specifications, see: - -- [`.github/copilot-instructions.md`](./.github/copilot-instructions.md) - Complete coding conventions and style guide -- [`CODESTYLE.md`](./CODESTYLE.md) - Code style and formatting rules -- [`.editorconfig`](./.editorconfig) - Automated style enforcement -- Project task definitions - `CSharpier Format`, `.Net Build`, `.Net Format`, `Husky.Net Run` +## Authoritative References + +For detailed specifications, see: + +- [`.github/copilot-instructions.md`](./.github/copilot-instructions.md) - Complete coding conventions and style guide +- [`CODESTYLE.md`](./CODESTYLE.md) - Code style and formatting rules +- [`.editorconfig`](./.editorconfig) - Automated style enforcement +- Project task definitions - `CSharpier Format`, `.Net Build`, `.Net Format`, `.Net Outdated Upgrade`, `Husky.Net Run` ## Quick Start for Derived Projects diff --git a/CODESTYLE.md b/CODESTYLE.md index 462f801..8037f47 100644 --- a/CODESTYLE.md +++ b/CODESTYLE.md @@ -27,6 +27,7 @@ Available VS Code tasks (use via `run_task` tool): - `.Net Format`: Verify formatting and style (must pass) - `CSharpier Format`: Auto-format code with CSharpier - `.Net Tool Update`: Update dotnet tools +- `.Net Outdated Upgrade`: Upgrade outdated NuGet dependencies (interactive prompt) - `Husky.Net Run`: Run pre-commit hooks manually ## Tooling and Editor diff --git a/README.md b/README.md index db46765..5c6102d 100644 --- a/README.md +++ b/README.md @@ -420,6 +420,9 @@ Licensed under the [MIT License][license-link]\ - `Review draft pull requests` - Actions / General: - `Allow GitHub Actions to create and approve pull requests` +- Labels: + - `https://github.com/ptr727/[project]/labels` + - Add `automated-codegen` label. ### Template - Branching Workflow