From 1db4bb9eeb4c6b9a0aa14d83679fbd55ff4255e1 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 08:55:52 +0000 Subject: [PATCH 1/3] ci: trigger agent review on PRs changing the OpenAPI spec Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GbxoNhsbaY9wGSvRbqG2sF --- .github/workflows/openapi-spec-review.yaml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/openapi-spec-review.yaml diff --git a/.github/workflows/openapi-spec-review.yaml b/.github/workflows/openapi-spec-review.yaml new file mode 100644 index 0000000000..a1fb2f9bf9 --- /dev/null +++ b/.github/workflows/openapi-spec-review.yaml @@ -0,0 +1,44 @@ +name: OpenAPI spec review + +on: + pull_request: + types: [opened] + 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 }} + run: | + jq -n --arg pr_url "$PR_URL" '{ + agent: "agent_0174zMwq9qzt879TvNydsk7U", + environment_id: "env_01GHCycXuDrfD7iMFZFie9fD", + vault_ids: ["vlt_011CgBEg4og89Ai1ea6rFSiL"], + title: "PR: \($pr_url)", + 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 @- From 3f20ed191eca09bfd2d3c1fc7c0ed5b449b38409 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 09:06:07 +0000 Subject: [PATCH 2/3] ci: also trigger OpenAPI agent review on new commits to the PR Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GbxoNhsbaY9wGSvRbqG2sF --- .github/workflows/openapi-spec-review.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openapi-spec-review.yaml b/.github/workflows/openapi-spec-review.yaml index a1fb2f9bf9..89af9b3730 100644 --- a/.github/workflows/openapi-spec-review.yaml +++ b/.github/workflows/openapi-spec-review.yaml @@ -2,7 +2,7 @@ name: OpenAPI spec review on: pull_request: - types: [opened] + types: [opened, synchronize] paths: - 'apify-api/openapi/**' From 2dc6943946b34b8df57e095eb30387e3da30e66b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 09:50:23 +0000 Subject: [PATCH 3/3] ci: name OpenAPI review session after the PR number Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GbxoNhsbaY9wGSvRbqG2sF --- .github/workflows/openapi-spec-review.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/openapi-spec-review.yaml b/.github/workflows/openapi-spec-review.yaml index 89af9b3730..71a1b32f1c 100644 --- a/.github/workflows/openapi-spec-review.yaml +++ b/.github/workflows/openapi-spec-review.yaml @@ -21,12 +21,13 @@ jobs: 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" '{ + 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_url)", + title: "PR #\($pr_number)", initial_events: [ { type: "user.message",