Skip to content

Commit 72bd6f8

Browse files
authored
Document PR workflow (#1487)
1 parent 7a64b9d commit 72bd6f8

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

Diff for: .github/CONTRIBUTING.md

+32-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ When you are creating an enhancement suggestion, please include as many details
3939

4040
- **Use a clear and descriptive title** for the issue to identify the suggestion.
4141
- **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
42-
- **Provide specific examples to demonstrate the usage.** Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks).
42+
- **Provide specific examples to demonstrate the usage.** Include copy/pasteable snippets which you use in those examples as [Markdown code blocks](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks).
4343
- **Describe the current behavior and explain which behavior you expected to see instead** and why.
4444
- **Explain why this enhancement would be useful** to most users and isn't something that can or should be implemented in your API project directly.
4545
- **Verify that your enhancement does not conflict** with the [JSON:API specification](https://jsonapi.org/).
@@ -56,7 +56,7 @@ Please follow these steps to have your contribution considered by the maintainer
5656
- Follow all instructions in the template. Don't forget to add tests and update documentation.
5757
- After you submit your pull request, verify that all status checks are passing. In release builds, all compiler warnings are treated as errors, so you should address them before push.
5858

59-
We use [CSharpGuidelines](https://csharpcodingguidelines.com/) as our coding standard (with a few minor exceptions). Coding style is validated during PR build, where we inject an extra settings layer that promotes various suggestions to warning level. This ensures a high-quality codebase without interfering too much when editing code.
59+
We use [CSharpGuidelines](https://csharpcodingguidelines.com/) as our coding standard. Coding style is validated during PR build, where we inject an extra settings layer that promotes various IDE suggestions to warning level. This ensures a high-quality codebase without interfering too much while editing code.
6060
You can run the following [PowerShell scripts](https://github.com/PowerShell/PowerShell/releases) locally:
6161
- `pwsh ./inspectcode.ps1`: Scans the code for style violations and opens the result in your web browser.
6262
- `pwsh ./cleanupcode.ps1 [branch-name-or-commit-hash]`: Reformats the codebase to match with our configured style, optionally only changed files since the specified branch (usually master).
@@ -86,13 +86,39 @@ public sealed class AppDbContext : DbContext
8686
}
8787
```
8888

89+
### Pull request workflow
90+
91+
Please follow the steps and guidelines below for a smooth experience.
92+
93+
Authors:
94+
- When opening a new pull request, create it in **Draft** mode.
95+
- After you've completed the work *and* all checks are green, click the **Ready for review** button.
96+
- If you have permissions to do so, ask a team member for review.
97+
- Once the review has started, don't force-push anymore.
98+
- When you've addressed feedback from a conversation, mark it with a thumbs-up or add a some text.
99+
- Don't close a conversation you didn't start. The creator closes it after verifying the concern has been addressed.
100+
- Apply suggestions in a batch, instead of individual commits (to minimize email notifications).
101+
- Re-request review when you're ready for another round.
102+
- If you want to clean up your commits before merge, let the reviewer know in time. This is optional.
103+
104+
Reviewers:
105+
- If you're unable to review within a few days, let the author know what to expect.
106+
- Use **Start a review** instead of **Add single comment** (to minimize email notifications).
107+
- Consider to use suggestions (the ± button).
108+
- Don't close a conversation you didn't start. Close the ones you opened after verifying the concern has been addressed.
109+
- Once approved, use a merge commit only if all commits are clean. Otherwise, squash them into a single commit.
110+
A commit is considered clean when:
111+
- It is properly documented and covers all aspects of an isolated change (code, style, tests, docs).
112+
- Checking out the commit results in a green build.
113+
- Having this commit show up in the history is helpful (and can potentially be reverted).
114+
89115
## Creating a release (for maintainers)
90116

91117
- Verify documentation is up-to-date
92-
- Bump the package version in Directory.Build.props
118+
- Bump the package version in `Directory.Build.props`
93119
- Create a GitHub release
94-
- Update https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb to consume the new version and release
95-
- Create a new branch in https://github.com/json-api-dotnet/MigrationGuide and update README.md in master
120+
- Update [JsonApiDotNetCore.MongoDb](https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb) to consume the new version and release
121+
- Create a new branch in [MigrationGuide](https://github.com/json-api-dotnet/MigrationGuide) and update README.md in master, if major version change
96122

97123
## Backporting and hotfixes (for maintainers)
98124

@@ -101,7 +127,7 @@ public sealed class AppDbContext : DbContext
101127
git checkout tags/v2.5.1 -b release/2.5.2
102128
```
103129
- Cherrypick the merge commit: `git cherry-pick {git commit SHA}`
104-
- Bump the package version in Directory.Build.props
130+
- Bump the package version in `Directory.Build.props`
105131
- Make any other compatibility, documentation, or tooling related changes
106132
- Push the branch to origin and verify the build
107133
- Once the build is verified, create a GitHub release, tagging the release branch

0 commit comments

Comments
 (0)