Skip to content

Add section for reviews via github actions #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion code-review-bot/trigger-code-review.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,32 @@ You can trigger Greptile to review a PR manually by commenting `@greptileai` on

<Note>
GitHub does not allow users to tag bots, so as you comment `@greptileai` it may not show you the bot in the dropdown suggestions..
</Note>
</Note>

### Trigger via Github Action

If you only want Greptile to review your PRs after certain actions were successful, e.g. because a Greptile review does not make sense if linter actions are failing anyway and test were not passing, then you can use the comment approach from above. Here's a sample github action pipeline:

```
name: Continuous Testing

on:
push:
branches:
- '**'

jobs:
test:
runs-on: ubuntu-latest
steps:
# do your thing here
Greptile:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: mshick/add-pr-comment@v2
with:
message: "@greptileai Can you please review this PR?"
needs: test
```