Skip to content
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

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
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
36 changes: 36 additions & 0 deletions .github/workflows/ai-pr-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 }}
Copy link

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.

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 }}
Copy link

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.

with:
debug: false
review_simple_changes: false
review_comment_lgtm: false
Loading