Skip to content

Commit

Permalink
Merge pull request #11 from rootiest/master
Browse files Browse the repository at this point in the history
Merge changes
  • Loading branch information
rootiest authored Jun 8, 2023
2 parents 4d24d94 + a142849 commit 32df317
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 16 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ai-security-check-for-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: AI Security Check for Pull Requests

on:
pull_request:
branches:
- main

jobs:
ai_security_check_for_pull_requests:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Finding security and privacy code vulnerabilities
id: ai_security_check
uses: obetomuniz/[email protected]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_REPOSITORY: ${{ github.repository }}
GH_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.number }}
OPENAI_TOKEN: ${{ secrets.OCO_OPENAI_API_KEY }}

- name: Comment on pull request
uses: actions/github-script@v6
env:
PR_COMMENT: ${{ steps.ai_security_check.outputs.pr_comment }}
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const prComment = process.env.PR_COMMENT || "No security or privacy issues found.";
const { data } = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: prComment
});
19 changes: 9 additions & 10 deletions .github/workflows/md_links.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

name: Check Links

on:
push:
push:

jobs:
markdown-link-check:
name: Check markdown files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Markdown links check
uses: ruzickap/action-my-markdown-link-checker@v1
markdown-link-check:
name: Check markdown files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Markdown links check
uses: ruzickap/action-my-markdown-link-checker@v1.1.0
12 changes: 6 additions & 6 deletions .github/workflows/md_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Lint MarkDown
on: [push]

jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: "articulate/actions-markdownlint@v1"
with:
config: "markdownlint.json"
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: "articulate/actions-markdownlint@v1.1.0"
with:
config: "markdownlint.json"
22 changes: 22 additions & 0 deletions .github/workflows/openai-pr-description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: OpenAI PR Description Generator

on:
pull_request:
types:
- opened
- synchronize

permissions:
pull-requests: write
contents: read

jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Ant0wan/[email protected]
with:
api-key: ${{ secrets.OCO_OPENAI_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/openai-pr-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Code Review

permissions:
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:
- uses: fluxninja/openai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OCO_OPENAI_API_KEY }}
with:
debug: false
review_simple_changes: false
review_comment_lgtm: false

0 comments on commit 32df317

Please sign in to comment.