/01 API
Add Nexdge to any CI pipeline. Review code on every push or pull request automatically.
GitHub Actions
Add your Nexdge API key as a GitHub secret named NEXDGE_API_KEY, then add this workflow file to .github/workflows/nexdge.yml. Code is passed through jq rather than a raw shell string, so quotes, backslashes, and newlines in the file don't break the request.
.github/workflows/nexdge.yml
name: Nexdge Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Nexdge review
env:
NEXDGE_API_KEY: ${{ secrets.NEXDGE_API_KEY }}
run: |
jq -n --arg code "$(cat changed-file.js)" --arg lang "javascript" \
'{code: $code, language: $lang}' \
| curl -X POST https://www.nexdge.com/api/v1/analyze \
-H "Authorization: Bearer $NEXDGE_API_KEY" \
-H "Content-Type: application/json" \
-d @-Any CI system
Nexdge is a plain HTTP API. Any CI system that can run curl and jq can integrate with it. Set your API key as an environment variable, encode the file safely, and POST to the analyze endpoint.
shell
jq -n --arg code "$(cat your-file.js)" --arg lang "javascript" \
'{code: $code, language: $lang}' \
| curl -X POST https://www.nexdge.com/api/v1/analyze \
-H "Authorization: Bearer $NEXDGE_API_KEY" \
-H "Content-Type: application/json" \
-d @-