Source: CONTRIBUTING.md - Pull Request Guidelines
Before submitting a PR, ensure:
-
Title follows format:
"Fixes #issue. Terse description"- If multiple issues:
"Fixes #123, #456. Terse description"
- If multiple issues:
-
Description includes:
- Fixes #issuefor each issue near the top- Instructions for pulling down locally (see template below)
-
Tests added for new functionality (see Testing Patterns)
-
Coverage maintained or increased (70%+ for new code)
-
Scenarios updated in UICatalog when adding features
-
Warnings - No new warnings introduced
- Any file modified in PR that currently generates warnings MUST be fixed
- Exception: Warnings caused by
[Obsolete]attributes can remain
-
Code formatting applied (see Code Layout)
-
Build passes locally:
dotnet build --no-restore -
Tests pass locally:
dotnet test --project Tests/UnitTestsParallelizable --no-build && dotnet test --project Tests/UnitTests.NonParallelizable --no-build
## Summary
[Brief description of changes]
- Fixes #issue_number
## Changes
- [List key changes]
- [Include rationale for non-obvious decisions]
## Testing
- [Describe how you tested the changes]
- [List any new test cases added]
## To pull down this PR locally:
```bash
git remote add copilot <your-fork-url>
git fetch copilot <branch-name>
git checkout copilot/<branch-name>dotnet restore
dotnet build --configuration Debug --no-restoreExpected: 0 errors, no new warnings
dotnet test --project Tests/UnitTestsParallelizable --no-build --verbosity normal && dotnet test --project Tests/UnitTests.NonParallelizable --no-build --verbosity normalExpected: All tests pass
Coverage collection is temporarily disabled in CI during the xUnit v3 / MTP migration.
For ReSharper/Rider users:
- Run "Full Cleanup" profile (
Ctrl-E-C) - Only format files you modified
For Visual Studio users:
- Format document (
Ctrl-K-D) - Only format files you modified
git status
git diffVerify:
- No unintended changes
- No debugging code left behind
- No commented-out code (unless necessary with explanation)
- ❌ Don't modify unrelated code
- ❌ Don't remove/edit unrelated tests
- ❌ Don't break existing functionality
- ❌ Don't add tests to
UnitTests.NonParallelizableif they can be parallelizable; never add tests toUnitTests.Legacy - ❌ Don't decrease code coverage
- ❌ Don't introduce new warnings
- ❌ Don't include commented-out code without explanation
- ❌ Don't add new linters/formatters
- Monitor CI/CD pipelines - Ensure all checks pass
- Address review feedback promptly
- Keep PR updated with
developif needed:git fetch origin git rebase origin/develop git push --force-with-lease