-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Code Review | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
concurrency: | ||
group: | ||
${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}-${{ github.event_name == 'pull_request_review_comment' && 'pr_comment' || 'pr' }} | ||
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} | ||
|
||
jobs: | ||
review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | ||
role-session-name: gha-session | ||
aws-region: us-east-2 | ||
|
||
- 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 commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
with: | ||
debug: true | ||
review_simple_changes: true | ||
review_comment_lgtm: true | ||
bedrock_light_model: 'us.anthropic.claude-3-haiku-20240307-v1:0' | ||
bedrock_heavy_model: 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | ||
Comment on lines
+37
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
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.