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

EPS-894: AI code reviewer yml file #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Description
[BSF-PR-SUMMARY]

### Screenshots
<!-- if applicable -->

### Types of changes
<!-- What types of changes does your code introduce? -->
<!-- Bug fix (non-breaking change which fixes an issue) -->
<!-- New feature (non-breaking change which adds functionality) -->
<!-- Breaking change -->

### How has this been tested?
<!-- Please describe in detail how you tested your changes. -->

### Checklist:
- [ ] My code is tested
- [ ] My code follows accessibility standards <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->
- [ ] My code has proper inline documentation <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->
- [ ] I've included any necessary tests <!-- if applicable -->
- [ ] I've included developer documentation <!-- if applicable -->
- [ ] I've added proper labels to this pull request <!-- if applicable -->
45 changes: 45 additions & 0 deletions .github/workflows/ai-code-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: BSF Code Reviewer

on:
pull_request:
types: [opened, synchronize, edited]

permissions: write-all

jobs:
CHECK_SHORTCODE:
if: ${{ github.event.action == 'edited' || contains(github.event.pull_request.body, '[BSF-PR-SUMMARY]') }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: WRITE PR SUMMARY
uses: brainstormforce/pull-request-reviewer@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ACTION_CONTEXT: 'CHECK_SHORTCODE'
EXCLUDE_EXTENSIONS: "md, yml, lock"
INCLUDE_EXTENSIONS: "php, js, jsx, ts, tsx, css, scss, html, json"
EXCLUDE_PATHS: "node_modules/,vendor/"

CODE_REVIEW:
needs: CHECK_SHORTCODE
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: AI CODE REVIEW
uses: brainstormforce/pull-request-reviewer@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ACTION_CONTEXT: "CODE_REVIEW"
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
EXCLUDE_EXTENSIONS: "md, yml, lock"
INCLUDE_EXTENSIONS: "php, js, jsx, ts, tsx, css, scss, html, json"
EXCLUDE_PATHS: "node_modules/,vendor/"
Loading