Skip to content

Commit

Permalink
Add .coderabbit.yml config and update pull request template (#16665)
Browse files Browse the repository at this point in the history
Summary of the issue:
CodeRabbit is a tool NV Access has been trialling for code reviews in NVDA.
AI code reviews create helpful summaries of PRs, and pick up issues other reviews may miss, or pick up issues before another reviewer gets to it, saving time.
Now that we are somewhat happy with the current config, we should commit it to the repository rather than rely on the GUI.
This means contributors can more easily improve the auto review process such as improving the path prompts and adding learnings.

Description of user facing changes
AI code reviews will now happen automatically.

Description of development approach
Followed steps in docs.coderabbit.ai/guides/configure-coderabbit
  • Loading branch information
seanbudd authored Jun 11, 2024
1 parent dff28c7 commit 014a6e7
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .coderabbit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# https://docs.coderabbit.ai/guides/configure-coderabbit/

language: "en-US"
early_access: true
reviews:
profile: "chill"
high_level_summary: true
request_changes_workflow: false
review_status: false
collapse_walkthrough: false
poem: false
auto_review:
enabled: true
auto_incremental_review: false
drafts: false
base_branches:
- master
- beta
- rc
path_instructions:
- path: "**/*"
instructions: "
Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues.
Avoid commenting on minor issues such as linting, formatting and style issues.
This project uses tabs instead of spaces, do not suggest usage of spaces over tabs.
Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint?
Explain what makes them suspicious.
"
- path: "**/*.py"
instructions: "
_, pgettext, ngettext, and ngettext are defined globally, errors for this being undefined can be ignored.
"
- path: "**/*.md"
instructions: "
Focus on grammar, spelling, and punctuation.
Also consider readability and clarity of contents.
Ensure that changes follow the style of one sentence per line, suggest changes if this is not met.
"
tools:
github-checks:
enabled: true
ruff:
# Should become true if we switch linters,
# right now linting is done by a flake8 check (#14817).
enabled: false
markdownlint:
# We use custom markdown syntax such as {#Anchor} for anchors.
# This is not supported by markdownlint.
# In future we plan to introduce markdownlint directly with custom rules. (#16453)
enabled: false
chat:
auto_reply: true
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTe
- Localization in other languages / culture than English
- [ ] API is compatible with existing add-ons.
- [ ] Security precautions taken.

<!-- Please keep the following -->
@coderabbitai summary
6 changes: 6 additions & 0 deletions projectDocs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ If you are new to the project, or looking for some way to help take a look at:
- When the PR is approved it will be merged, and the change will be active in the next alpha build.
- If issues are raised with your PR, it may be marked as a draft.
Please mark it as ready for review when you have addressed the review comments.
- CodeRabbit AI will review your code.
- Please participate in the review process, the AI can respond to review comments, questions and feedback.
- Some comments may not be helpful due to the nature of AI, and some might be useful.
Please indicate comments which you intend to ignore and why.
For large numbers of unhelpful comments, please mark them as resolved or comment `@coderabbitai resolve` to resolve all comments.
- To request another review from CodeRabbit, comment `@coderabbitai review`
1. Feedback from alpha users
- After a PR is merged, watch for feedback from alpha users / testers.
You may have to follow up to address bugs or missed use-cases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This page is meant to serve as an explanation for how to fill out
[our Github pull request template](https://github.com/nvaccess/nvda/blob/master/.github/PULL_REQUEST_TEMPLATE.md)

### The title
Please use a descriptive title of the changes.
Avoid relying on references to issues or PRs, ensure the title is self-descriptive.
To automatically generate a title, set the title to `@coderabbitai title`.

## The template
At the start of the template there is a HTML comment block (starting with `<!--`),
which points to this wiki page, it can be left in place and will not appear once the issue is saved.
Expand Down

0 comments on commit 014a6e7

Please sign in to comment.