Skip to content

Commit

Permalink
docs: add code review guide (#2772)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairyhum committed May 23, 2024
1 parent 9f740a6 commit 20c367c
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
73 changes: 73 additions & 0 deletions CODE_REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Code review requiements

This document describe responsibilities of code reviewers when reviewing PRs.

Pull request process is described in [contributing guide](./CONTRIBUTING.md#submitting-pull-requests)

## Base checklist

- All automated test steps pass (e.g. tests, lints, build)
- PR title follows [commit conventions](CONTRIBUTING.md#commit-conventions)
- If PR format is different, reviewer should change it to follow the conventions
- PR has a description with reasoning and change overview
- If description is missing but clear for reviewer, reviewer may add a comment or edit description
- New feature or fix has tests proving it works
- Reviewer should request changes from contributor to add tests
- If PR changes documented behaviour, there should be update to `/docs` or inline comments
- Reviewer should request changes from contributor to update docs
- If PR introduces breaking changes, fixes a bug or adds a new feature, there should be a [release note](#release-notes)
- Reviewer may request changes from the contributor to add a release note
- Reviewer may add a release note by themself in order to unblock the merge process

## Requesting changes

It's recommended to request changes by submitting `comment` type reviews.
`Request changes` type review would block merging until requester approves the
changes, this can slow down the process if there are multiple reviewers.

## Approving and merging

We use `kueue` bot to merge approved PRs.

If PR is approved, all checks are passing and it has the `kueue` label, it will
be automatically squashed and merged.

For PRs from Kanister developers, the committer should add the `kueue` label after
PR was approved.

For PRs from community, the reviewer should add the `kueue` label.

## Release notes

Kanister is using the [reno](https://docs.openstack.org/reno/latest/) tool to generate changelogs from release note files.

To add release note one could run:

```
make reno-new note=<note_name>
```

Note name should be a short description of a change.

File format is described in [reno docs](https://docs.openstack.org/reno/latest/user/usage.html#editing-a-release-note)

Typical examples would be:

```
---
features:
- Added new functionality doing X
```

Or:

```
---
fixes:
- Fixed bug with pod output format
upgrade:
- Make sure custom blueprints follow pod output format spec
```

See [release notes](./releasenotes/README.md) for more info.

10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ We are using squash and merge approach to PRs which means that commit descriptio

It's recommended to use conventional commits when strarting a PR, but follow-up commits in the PR don't have to follow the convention.

### Release notes

If submitted change fixes a bug, introduces a new feature or breaking change, contributor should add a release note.
Kanister is using the [reno](https://docs.openstack.org/reno/latest/) tool to track release notes.

Release note can be added with `make reno-new note=<note_name>` command, which will create a note file.
Contributor should edit and commit the note file.

See [release notes](./releasenotes/README.md) for more info.

### Submitting Pull Requests

**PR titles should be in following format:**
Expand Down

0 comments on commit 20c367c

Please sign in to comment.