Skip to content

Commit

Permalink
report error in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-jn committed Oct 7, 2024
1 parent e52b130 commit 29a93d0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/schema-authorize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
check_changes:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -52,10 +52,26 @@ jobs:
if: env.file_changed == 'true'
run: |
commit_author="${{ env.commit_author }}"
ls -lh
if jq -e ".[] | select(.login == \"$commit_author\")" team.json > /dev/null; then
echo "Authorized change."
else
echo "Unauthorized change detected!"
exit 1
fi
report:
needs: verify
if: needs.verify.result == 'failure'
runs-on: ubuntu-latest
steps:
- name: Send failure result to PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Unauthorized change detected!"
})
1 change: 1 addition & 0 deletions docs/tools/vdb_table/vendor.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"type": "object",
"properties": {


"name": {"type": "string", "$comment": "About | Vendor | " },
"links": {"allOf": [{"$ref": "#/$defs/links"}], "$comment": "About | Links | " },
"oss": {"allOf": [{"$ref": "#/$defs/featureWithSource"}], "$comment": "About | OSS | The code-base is open source and users can self-host it for free." },
Expand Down

0 comments on commit 29a93d0

Please sign in to comment.