Skip to content
Merged
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
45 changes: 45 additions & 0 deletions .github/workflows/openapi-spec-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: OpenAPI spec review

on:
pull_request:
types: [opened, synchronize]
paths:
- 'apify-api/openapi/**'

permissions:
contents: read

jobs:
trigger-review:
name: Trigger agent review
runs-on: ubuntu-latest
# Secrets are not available to PRs from forks
if: github.event.pull_request.head.repo.full_name == github.repository

steps:
- name: Start review session
env:
ANTHROPIC_API_KEY: ${{ secrets.OPENAPI_SPEC_CHECKER_KEY }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
jq -n --arg pr_url "$PR_URL" --arg pr_number "$PR_NUMBER" '{
agent: "agent_0174zMwq9qzt879TvNydsk7U",
environment_id: "env_01GHCycXuDrfD7iMFZFie9fD",
vault_ids: ["vlt_011CgBEg4og89Ai1ea6rFSiL"],
title: "PR #\($pr_number)",
initial_events: [
{
type: "user.message",
content: [
{ type: "text", text: "Review this pull request: \($pr_url)" }
]
}
]
}' | curl -sS --fail-with-body https://api.anthropic.com/v1/sessions \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "anthropic-workspace-id: wrkspc_01WgY7dQqUQz8iqpLXhjt8Ho" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-d @-
Loading