-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Merge changes #11
Merge changes #11
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+16
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 OpenAI The
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 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 }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+24
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 OpenAI The
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+34
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 OpenAI The
Suggested change
|
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 |
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 }} |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 OpenAI
The
actions/checkout@v2
action is already set up in the workflow file. No need to add it again.