Skip to content

Commit 33ba0c1

Browse files
authored
Merge pull request #31 from brainstormforce/yml-code-ai
EPS-894: AI code reviewer yml file
2 parents 3e1ab81 + df56b35 commit 33ba0c1

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Description
2+
[BSF-PR-SUMMARY]
3+
4+
### Screenshots
5+
<!-- if applicable -->
6+
7+
### Types of changes
8+
<!-- What types of changes does your code introduce? -->
9+
<!-- Bug fix (non-breaking change which fixes an issue) -->
10+
<!-- New feature (non-breaking change which adds functionality) -->
11+
<!-- Breaking change -->
12+
13+
### How has this been tested?
14+
<!-- Please describe in detail how you tested your changes. -->
15+
16+
### Checklist:
17+
- [ ] My code is tested
18+
- [ ] My code follows accessibility standards <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->
19+
- [ ] My code has proper inline documentation <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->
20+
- [ ] I've included any necessary tests <!-- if applicable -->
21+
- [ ] I've included developer documentation <!-- if applicable -->
22+
- [ ] I've added proper labels to this pull request <!-- if applicable -->
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: BSF Code Reviewer
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, edited]
6+
7+
permissions: write-all
8+
9+
jobs:
10+
CHECK_SHORTCODE:
11+
if: ${{ github.event.action == 'edited' || contains(github.event.pull_request.body, '[BSF-PR-SUMMARY]') }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
- name: WRITE PR SUMMARY
18+
uses: brainstormforce/pull-request-reviewer@master
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
22+
ACTION_CONTEXT: 'CHECK_SHORTCODE'
23+
EXCLUDE_EXTENSIONS: "md, yml, lock"
24+
INCLUDE_EXTENSIONS: "php, js, jsx, ts, tsx, css, scss, html, json"
25+
EXCLUDE_PATHS: "node_modules/,vendor/"
26+
27+
CODE_REVIEW:
28+
needs: CHECK_SHORTCODE
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout Repository
32+
uses: actions/checkout@v3
33+
34+
- name: AI CODE REVIEW
35+
uses: brainstormforce/pull-request-reviewer@master
36+
with:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39+
ACTION_CONTEXT: "CODE_REVIEW"
40+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
41+
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
42+
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
43+
EXCLUDE_EXTENSIONS: "md, yml, lock"
44+
INCLUDE_EXTENSIONS: "php, js, jsx, ts, tsx, css, scss, html, json"
45+
EXCLUDE_PATHS: "node_modules/,vendor/"

0 commit comments

Comments
 (0)