-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: added bedrock ai pr reviewer #1
Conversation
WalkthroughThis change introduces a GitHub Actions workflow for automated pull request reviews using Bedrock AI. The workflow is triggered by pull request events and review comments. It sets up AWS credentials and utilizes the Bedrock PR Reviewer action to analyze changes, potentially leaving "LGTM" comments for simple modifications. This automation aims to streamline the code review process and enhance overall development efficiency. Changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/ai-pr-reviewer.yml (1)
Files not summarized due to errors (1)
- .github/workflows/ai-pr-reviewer.yml (nothing obtained from bedrock)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with AI reviewer (/reviewbot
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
/reviewbot
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
/reviewbot: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/ai-pr-reviewer.yml (1)
Files not summarized due to errors (1)
- .github/workflows/ai-pr-reviewer.yml (nothing obtained from bedrock)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with AI reviewer (/reviewbot
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
/reviewbot
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
/reviewbot: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/ai-pr-reviewer.yml (1)
Files not summarized due to errors (1)
- .github/workflows/ai-pr-reviewer.yml (nothing obtained from bedrock)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with AI reviewer (/reviewbot
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
/reviewbot
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
/reviewbot: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/ai-pr-reviewer.yml (1)
Files not summarized due to errors (1)
- .github/workflows/ai-pr-reviewer.yml (nothing obtained from bedrock)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with AI reviewer (/reviewbot
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
/reviewbot
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
/reviewbot: ignore
anywhere in the PR description to pause further reviews from the bot.
150dbf9
to
9c331ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/ai-pr-reviewer.yml (1)
Review comments generated (3)
- Review: 3
- LGTM: 0
Tips
Chat with AI reviewer (/reviewbot
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
/reviewbot
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
/reviewbot: ignore
anywhere in the PR description to pause further reviews from the bot.
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AWS_ROLE_ARN
secret is being used here. Ensure that this secret is properly set in your repository's secrets settings to avoid deployment issues.
- name: PR review | ||
uses: tmokmss/bedrock-pr-reviewer@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using secrets.GITHUB_TOKEN
is generally safe, but make sure the permissions set at the top of the workflow file (lines 3-6) are the minimum required for the action to function properly.
bedrock_light_model: 'us.anthropic.claude-3-haiku-20240307-v1:0' | ||
bedrock_heavy_model: 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Bedrock model versions are hardcoded. Consider using variables or repository secrets for these values to make it easier to update in the future without changing the workflow file.
Summary (generated)
Release Notes:
This update introduces an automated PR review process, enhancing code quality and streamlining the development workflow. Users can expect faster feedback on their contributions and improved consistency in code reviews.