-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update workflow file example on docs
- Loading branch information
1 parent
12e1ba4
commit 6929bfd
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ jobs: | |
|
||
- name: Finding security and privacy code vulnerabilities | ||
id: ai_security_check | ||
run: | | ||
echo "PR_COMMENT_BASE64=$(node ./ai-security-check-for-pr.js)" >> $GITHUB_OUTPUT | ||
uses: obetomuniz/[email protected] | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GH_REPOSITORY: ${{ github.repository }} | ||
|
@@ -55,12 +54,11 @@ jobs: | |
- name: Comment on pull request | ||
uses: actions/github-script@v6 | ||
env: | ||
PR_COMMENT_BASE64: ${{ steps.ai_security_check.outputs.PR_COMMENT_BASE64 }} | ||
PR_COMMENT: ${{ steps.ai_security_check.outputs.pr_comment }} | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
const prCommentBase64 = process.env.PR_COMMENT_BASE64 || ""; | ||
const prComment = Buffer.from(prCommentBase64, "base64").toString("utf8") || "No security or privacy issues found."; | ||
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, | ||
|