Skip to content

Commit

Permalink
Merge pull request #244 from brainstormforce/dev
Browse files Browse the repository at this point in the history
Workflow changes
  • Loading branch information
vrundakansara authored Jan 7, 2025
2 parents 1966e28 + ad4d6ef commit f5deca2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/code-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: BSF Code Reviewer

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

permissions: write-all

jobs:
CHECK_SHORTCODE:
if: 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/"

CODE_REVIEW:
needs: CHECK_SHORTCODE
if: always()
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"
EXCLUDE_EXTENSIONS: "md, yml, lock"
INCLUDE_EXTENSIONS: "php, js, jsx, ts, tsx, css, scss, html, json"
EXCLUDE_PATHS: "node_modules/"

0 comments on commit f5deca2

Please sign in to comment.