Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CSpell AI assistant

on:
pull_request:
branches:
- main
- dev
workflow_dispatch:

jobs:
cspell-ai-check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write # Дозволяємо генерацію OIDC токена
steps:
- name: Request AI CSpell Analysis
run: |
# Отримуємо OIDC токен через внутрішній API GitHub Actions
ID_TOKEN=$(curl -sLS "${ACTIONS_ID_TOKEN_REQUEST_URL}" -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" | jq -r '.value')
# Відправляємо запит на сервер аналізу
# Публічний URL сервера https://nitra.dev/spell-ai/ (dev) або https://7n.ai/spell-ai/ (prod)
curl -s -i -X POST "https://7n.ai/spell-ai/analyze" \
-H "Authorization: Bearer $ID_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"repo\": \"${{ github.repository }}\", \"prNumber\": ${{ github.event.pull_request.number }}}"