@vicoa/cli 1.6.2-win32-x64 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -0
- package/bin/vicoa.js +38 -0
- package/package.json +30 -10
- package/bin/_internal/81d243bd2c585b0f4821__mypyc.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/VCRUNTIME140.dll +0 -0
- package/bin/_internal/VCRUNTIME140_1.dll +0 -0
- package/bin/_internal/_asyncio.pyd +0 -0
- package/bin/_internal/_bz2.pyd +0 -0
- package/bin/_internal/_cffi_backend.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/_ctypes.pyd +0 -0
- package/bin/_internal/_decimal.pyd +0 -0
- package/bin/_internal/_hashlib.pyd +0 -0
- package/bin/_internal/_lzma.pyd +0 -0
- package/bin/_internal/_multiprocessing.pyd +0 -0
- package/bin/_internal/_overlapped.pyd +0 -0
- package/bin/_internal/_queue.pyd +0 -0
- package/bin/_internal/_socket.pyd +0 -0
- package/bin/_internal/_ssl.pyd +0 -0
- package/bin/_internal/_uuid.pyd +0 -0
- package/bin/_internal/_wmi.pyd +0 -0
- package/bin/_internal/_zoneinfo.pyd +0 -0
- package/bin/_internal/aiofile-3.11.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/aiofile-3.11.1.dist-info/METADATA +0 -511
- package/bin/_internal/aiofile-3.11.1.dist-info/RECORD +0 -15
- package/bin/_internal/aiofile-3.11.1.dist-info/WHEEL +0 -4
- package/bin/_internal/aiofile-3.11.1.dist-info/licenses/LICENCE +0 -195
- package/bin/_internal/aiofile-3.11.1.dist-info/licenses/LICENCE.md +0 -195
- package/bin/_internal/aiohttp/_http_parser.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_http_writer.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_websocket/mask.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_websocket/reader_c.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/api-ms-win-core-console-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-datetime-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-debug-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-fibers-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-fibers-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l2-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-handle-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-heap-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-kernel32-legacy-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-localization-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-memory-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-profile-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-string-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-synch-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-synch-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-sysinfo-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-timezone-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-util-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-conio-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-convert-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-environment-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-heap-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-locale-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-math-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-process-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-string-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-time-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-utility-l1-1-0.dll +0 -0
- package/bin/_internal/attrs-26.1.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/attrs-26.1.0.dist-info/METADATA +0 -199
- package/bin/_internal/attrs-26.1.0.dist-info/RECORD +0 -55
- package/bin/_internal/attrs-26.1.0.dist-info/WHEEL +0 -4
- package/bin/_internal/attrs-26.1.0.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/base_library.zip +0 -0
- package/bin/_internal/certifi/cacert.pem +0 -3863
- package/bin/_internal/certifi/py.typed +0 -0
- package/bin/_internal/charset_normalizer/cd.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/charset_normalizer/md.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/click-8.4.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/click-8.4.1.dist-info/METADATA +0 -84
- package/bin/_internal/click-8.4.1.dist-info/RECORD +0 -40
- package/bin/_internal/click-8.4.1.dist-info/WHEEL +0 -4
- package/bin/_internal/click-8.4.1.dist-info/licenses/LICENSE.txt +0 -28
- package/bin/_internal/cryptography/hazmat/bindings/_rust.pyd +0 -0
- package/bin/_internal/cryptography-49.0.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/cryptography-49.0.0.dist-info/METADATA +0 -110
- package/bin/_internal/cryptography-49.0.0.dist-info/RECORD +0 -195
- package/bin/_internal/cryptography-49.0.0.dist-info/WHEEL +0 -4
- package/bin/_internal/cryptography-49.0.0.dist-info/licenses/LICENSE +0 -3
- package/bin/_internal/cryptography-49.0.0.dist-info/licenses/LICENSE.APACHE +0 -202
- package/bin/_internal/cryptography-49.0.0.dist-info/licenses/LICENSE.BSD +0 -27
- package/bin/_internal/cryptography-49.0.0.dist-info/sboms/cryptography-rust.cyclonedx.json +0 -1365
- package/bin/_internal/cryptography-49.0.0.dist-info/sboms/sbom.json +0 -43
- package/bin/_internal/email_validator-2.3.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/email_validator-2.3.0.dist-info/METADATA +0 -466
- package/bin/_internal/email_validator-2.3.0.dist-info/RECORD +0 -27
- package/bin/_internal/email_validator-2.3.0.dist-info/WHEEL +0 -5
- package/bin/_internal/email_validator-2.3.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/email_validator-2.3.0.dist-info/licenses/LICENSE +0 -27
- package/bin/_internal/email_validator-2.3.0.dist-info/top_level.txt +0 -1
- package/bin/_internal/fastmcp-3.4.2.dist-info/INSTALLER +0 -1
- package/bin/_internal/fastmcp-3.4.2.dist-info/METADATA +0 -160
- package/bin/_internal/fastmcp-3.4.2.dist-info/RECORD +0 -5
- package/bin/_internal/fastmcp-3.4.2.dist-info/WHEEL +0 -4
- package/bin/_internal/fastmcp-3.4.2.dist-info/licenses/LICENSE +0 -201
- package/bin/_internal/frozenlist/_frozenlist.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/integrations/cli_wrappers/IMPORTANT_USE_CASES.md +0 -33
- package/bin/_internal/integrations/github/claude-code-action/CLAUDE.md +0 -136
- package/bin/_internal/integrations/github/claude-code-action/CODE_OF_CONDUCT.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/CONTRIBUTING.md +0 -116
- package/bin/_internal/integrations/github/claude-code-action/LICENSE +0 -21
- package/bin/_internal/integrations/github/claude-code-action/README.md +0 -53
- package/bin/_internal/integrations/github/claude-code-action/ROADMAP.md +0 -20
- package/bin/_internal/integrations/github/claude-code-action/SECURITY.md +0 -15
- package/bin/_internal/integrations/github/claude-code-action/action.yml +0 -294
- package/bin/_internal/integrations/github/claude-code-action/base-action/CLAUDE.md +0 -60
- package/bin/_internal/integrations/github/claude-code-action/base-action/CODE_OF_CONDUCT.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/base-action/CONTRIBUTING.md +0 -136
- package/bin/_internal/integrations/github/claude-code-action/base-action/LICENSE +0 -21
- package/bin/_internal/integrations/github/claude-code-action/base-action/MIRROR_DISCLAIMER.md +0 -11
- package/bin/_internal/integrations/github/claude-code-action/base-action/README.md +0 -521
- package/bin/_internal/integrations/github/claude-code-action/base-action/action.yml +0 -149
- package/bin/_internal/integrations/github/claude-code-action/base-action/bun.lock +0 -54
- package/bin/_internal/integrations/github/claude-code-action/base-action/examples/issue-triage.yml +0 -108
- package/bin/_internal/integrations/github/claude-code-action/base-action/package.json +0 -23
- package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/install-hooks.sh +0 -13
- package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/pre-push +0 -46
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/index.ts +0 -82
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/prepare-prompt.ts +0 -82
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-claude.ts +0 -257
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-vicoa.ts +0 -301
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/setup-claude-code-settings.ts +0 -68
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/validate-env.ts +0 -54
- package/bin/_internal/integrations/github/claude-code-action/base-action/test-local.sh +0 -12
- package/bin/_internal/integrations/github/claude-code-action/base-action/test-mcp-local.sh +0 -18
- package/bin/_internal/integrations/github/claude-code-action/base-action/tsconfig.json +0 -30
- package/bin/_internal/integrations/github/claude-code-action/bun.lock +0 -384
- package/bin/_internal/integrations/github/claude-code-action/docs/capabilities-and-limitations.md +0 -33
- package/bin/_internal/integrations/github/claude-code-action/docs/cloud-providers.md +0 -99
- package/bin/_internal/integrations/github/claude-code-action/docs/configuration.md +0 -345
- package/bin/_internal/integrations/github/claude-code-action/docs/custom-automations.md +0 -113
- package/bin/_internal/integrations/github/claude-code-action/docs/experimental.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/docs/faq.md +0 -205
- package/bin/_internal/integrations/github/claude-code-action/docs/migration-guide.md +0 -261
- package/bin/_internal/integrations/github/claude-code-action/docs/security.md +0 -38
- package/bin/_internal/integrations/github/claude-code-action/docs/setup.md +0 -146
- package/bin/_internal/integrations/github/claude-code-action/docs/usage.md +0 -213
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/auto-fix-ci.yml +0 -97
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/commands/fix-ci.md +0 -127
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/auto-fix-ci-signed.yml +0 -97
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/commands/fix-ci-signed.md +0 -148
- package/bin/_internal/integrations/github/claude-code-action/examples/issue-deduplication.yml +0 -63
- package/bin/_internal/integrations/github/claude-code-action/examples/issue-triage.yml +0 -75
- package/bin/_internal/integrations/github/claude-code-action/examples/vicoa.yml +0 -75
- package/bin/_internal/integrations/github/claude-code-action/package.json +0 -31
- package/bin/_internal/integrations/github/claude-code-action/scripts/install-hooks.sh +0 -13
- package/bin/_internal/integrations/github/claude-code-action/scripts/pre-commit +0 -46
- package/bin/_internal/integrations/github/claude-code-action/scripts/setup-network-restrictions.sh +0 -123
- package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/index.ts +0 -799
- package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/types.ts +0 -102
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/collect-inputs.ts +0 -58
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/format-turns.ts +0 -465
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/prepare.ts +0 -98
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/update-comment-link.ts +0 -245
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/client.ts +0 -23
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/config.ts +0 -4
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/queries/github.ts +0 -117
- package/bin/_internal/integrations/github/claude-code-action/src/github/context.ts +0 -277
- package/bin/_internal/integrations/github/claude-code-action/src/github/data/fetcher.ts +0 -233
- package/bin/_internal/integrations/github/claude-code-action/src/github/data/formatter.ts +0 -144
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch-cleanup.ts +0 -132
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch.ts +0 -163
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comment-logic.ts +0 -203
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/common.ts +0 -33
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/create-initial.ts +0 -111
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-claude-comment.ts +0 -70
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-with-branch.ts +0 -57
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/git-config.ts +0 -62
- package/bin/_internal/integrations/github/claude-code-action/src/github/token.ts +0 -108
- package/bin/_internal/integrations/github/claude-code-action/src/github/types.ts +0 -98
- package/bin/_internal/integrations/github/claude-code-action/src/github/utils/image-downloader.ts +0 -246
- package/bin/_internal/integrations/github/claude-code-action/src/github/utils/sanitizer.ts +0 -100
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/actor.ts +0 -64
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/permissions.ts +0 -47
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/trigger.ts +0 -148
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-actions-server.ts +0 -279
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-comment-server.ts +0 -101
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-file-ops-server.ts +0 -677
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-inline-comment-server.ts +0 -184
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/install-mcp-server.ts +0 -201
- package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/index.ts +0 -152
- package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/parse-tools.ts +0 -22
- package/bin/_internal/integrations/github/claude-code-action/src/modes/detector.ts +0 -66
- package/bin/_internal/integrations/github/claude-code-action/src/modes/registry.ts +0 -54
- package/bin/_internal/integrations/github/claude-code-action/src/modes/tag/index.ts +0 -187
- package/bin/_internal/integrations/github/claude-code-action/src/modes/types.ts +0 -100
- package/bin/_internal/integrations/github/claude-code-action/src/prepare/index.ts +0 -20
- package/bin/_internal/integrations/github/claude-code-action/src/prepare/types.ts +0 -20
- package/bin/_internal/integrations/github/claude-code-action/src/utils/retry.ts +0 -40
- package/bin/_internal/integrations/github/claude-code-action/tsconfig.json +0 -30
- package/bin/_internal/integrations/headless/tests/README.md +0 -58
- package/bin/_internal/integrations/n8n/LICENSE +0 -21
- package/bin/_internal/integrations/n8n/README.md +0 -298
- package/bin/_internal/integrations/n8n/package-lock.json +0 -2989
- package/bin/_internal/integrations/n8n/package.json +0 -68
- package/bin/_internal/integrations/n8n/src/credentials/OmnaraApi.credentials.ts +0 -52
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.json +0 -35
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.ts +0 -304
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/index.ts +0 -37
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/send.operation.ts +0 -151
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/sendAndWait.operation.ts +0 -252
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/end.operation.ts +0 -56
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/index.ts +0 -29
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/vicoa.png +0 -0
- package/bin/_internal/integrations/n8n/src/utils/GenericFunctions.ts +0 -93
- package/bin/_internal/integrations/n8n/src/utils/sendAndWait/configureWaitTillDate.ts +0 -42
- package/bin/_internal/integrations/n8n/src/utils/sendAndWait/descriptions.ts +0 -20
- package/bin/_internal/integrations/n8n/src/utils/sendAndWaitWebhook.ts +0 -72
- package/bin/_internal/integrations/n8n/tsconfig.json +0 -20
- package/bin/_internal/jiter/jiter.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/jsonschema/benchmarks/issue232/issue.json +0 -2653
- package/bin/_internal/jsonschema-4.26.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/jsonschema-4.26.0.dist-info/METADATA +0 -170
- package/bin/_internal/jsonschema-4.26.0.dist-info/RECORD +0 -82
- package/bin/_internal/jsonschema-4.26.0.dist-info/WHEEL +0 -4
- package/bin/_internal/jsonschema-4.26.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/jsonschema-4.26.0.dist-info/licenses/COPYING +0 -19
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/metaschema.json +0 -42
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +0 -56
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/content +0 -17
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/core +0 -57
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/format +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +0 -37
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/validation +0 -98
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/metaschema.json +0 -58
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +0 -48
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/content +0 -17
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/core +0 -51
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +0 -37
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +0 -15
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/validation +0 -98
- package/bin/_internal/jsonschema_specifications/schemas/draft3/metaschema.json +0 -172
- package/bin/_internal/jsonschema_specifications/schemas/draft4/metaschema.json +0 -149
- package/bin/_internal/jsonschema_specifications/schemas/draft6/metaschema.json +0 -153
- package/bin/_internal/jsonschema_specifications/schemas/draft7/metaschema.json +0 -166
- package/bin/_internal/libcrypto-3.dll +0 -0
- package/bin/_internal/libffi-8.dll +0 -0
- package/bin/_internal/libssl-3.dll +0 -0
- package/bin/_internal/mcp-1.28.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/mcp-1.28.0.dist-info/METADATA +0 -241
- package/bin/_internal/mcp-1.28.0.dist-info/RECORD +0 -228
- package/bin/_internal/mcp-1.28.0.dist-info/WHEEL +0 -4
- package/bin/_internal/mcp-1.28.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/mcp-1.28.0.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/multidict/_multidict.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/METADATA +0 -43
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/RECORD +0 -81
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/WHEEL +0 -4
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/entry_points.txt +0 -15
- package/bin/_internal/opentelemetry_api-1.42.1.dist-info/licenses/LICENSE +0 -201
- package/bin/_internal/propcache/_helpers_c.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/pydantic-2.13.4.dist-info/INSTALLER +0 -1
- package/bin/_internal/pydantic-2.13.4.dist-info/METADATA +0 -1294
- package/bin/_internal/pydantic-2.13.4.dist-info/RECORD +0 -217
- package/bin/_internal/pydantic-2.13.4.dist-info/WHEEL +0 -4
- package/bin/_internal/pydantic-2.13.4.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/pydantic_core/_pydantic_core.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/pyexpat.pyd +0 -0
- package/bin/_internal/python3.dll +0 -0
- package/bin/_internal/python312.dll +0 -0
- package/bin/_internal/pywin32_system32/pythoncom312.dll +0 -0
- package/bin/_internal/pywin32_system32/pywintypes312.dll +0 -0
- package/bin/_internal/rpds/rpds.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/select.pyd +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD +0 -21
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL +0 -5
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
- package/bin/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +0 -2
- package/bin/_internal/ucrtbase.dll +0 -0
- package/bin/_internal/unicodedata.pyd +0 -0
- package/bin/_internal/vicoa/_bin/README.md +0 -28
- package/bin/_internal/vicoa-1.6.2.dist-info/INSTALLER +0 -1
- package/bin/_internal/vicoa-1.6.2.dist-info/METADATA +0 -312
- package/bin/_internal/vicoa-1.6.2.dist-info/RECORD +0 -11
- package/bin/_internal/vicoa-1.6.2.dist-info/REQUESTED +0 -0
- package/bin/_internal/vicoa-1.6.2.dist-info/WHEEL +0 -5
- package/bin/_internal/vicoa-1.6.2.dist-info/direct_url.json +0 -1
- package/bin/_internal/vicoa-1.6.2.dist-info/entry_points.txt +0 -2
- package/bin/_internal/vicoa-1.6.2.dist-info/licenses/LICENSE +0 -201
- package/bin/_internal/vicoa-1.6.2.dist-info/top_level.txt +0 -4
- package/bin/_internal/watchfiles/_rust_notify.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/websockets/speedups.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/websockets-16.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/websockets-16.0.dist-info/METADATA +0 -179
- package/bin/_internal/websockets-16.0.dist-info/RECORD +0 -108
- package/bin/_internal/websockets-16.0.dist-info/WHEEL +0 -5
- package/bin/_internal/websockets-16.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/websockets-16.0.dist-info/licenses/LICENSE +0 -24
- package/bin/_internal/websockets-16.0.dist-info/top_level.txt +0 -1
- package/bin/_internal/win32/_win32sysloader.pyd +0 -0
- package/bin/_internal/win32/win32api.pyd +0 -0
- package/bin/_internal/win32/win32evtlog.pyd +0 -0
- package/bin/_internal/win32/win32job.pyd +0 -0
- package/bin/_internal/yaml/_yaml.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/yarl/_quoting_c.cp312-win_amd64.pyd +0 -0
- package/bin/vicoa.exe +0 -0
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import * as github from "@actions/github";
|
|
2
|
-
import type {
|
|
3
|
-
IssuesEvent,
|
|
4
|
-
IssuesAssignedEvent,
|
|
5
|
-
IssueCommentEvent,
|
|
6
|
-
PullRequestEvent,
|
|
7
|
-
PullRequestReviewEvent,
|
|
8
|
-
PullRequestReviewCommentEvent,
|
|
9
|
-
WorkflowRunEvent,
|
|
10
|
-
} from "@octokit/webhooks-types";
|
|
11
|
-
// Custom types for GitHub Actions events that aren't webhooks
|
|
12
|
-
export type WorkflowDispatchEvent = {
|
|
13
|
-
action?: never;
|
|
14
|
-
inputs?: Record<string, any>;
|
|
15
|
-
ref?: string;
|
|
16
|
-
repository: {
|
|
17
|
-
name: string;
|
|
18
|
-
owner: {
|
|
19
|
-
login: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
sender: {
|
|
23
|
-
login: string;
|
|
24
|
-
};
|
|
25
|
-
workflow: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type ScheduleEvent = {
|
|
29
|
-
action?: never;
|
|
30
|
-
schedule?: string;
|
|
31
|
-
repository: {
|
|
32
|
-
name: string;
|
|
33
|
-
owner: {
|
|
34
|
-
login: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type RepositoryDispatchEvent = {
|
|
40
|
-
action?: string;
|
|
41
|
-
client_payload?: Record<string, any>;
|
|
42
|
-
repository: {
|
|
43
|
-
name: string;
|
|
44
|
-
owner: {
|
|
45
|
-
login: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
sender?: {
|
|
49
|
-
login: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// Event name constants for better maintainability
|
|
54
|
-
const ENTITY_EVENT_NAMES = [
|
|
55
|
-
"issues",
|
|
56
|
-
"issue_comment",
|
|
57
|
-
"pull_request",
|
|
58
|
-
"pull_request_review",
|
|
59
|
-
"pull_request_review_comment",
|
|
60
|
-
] as const;
|
|
61
|
-
|
|
62
|
-
const AUTOMATION_EVENT_NAMES = [
|
|
63
|
-
"workflow_dispatch",
|
|
64
|
-
"schedule",
|
|
65
|
-
"workflow_run",
|
|
66
|
-
"repository_dispatch",
|
|
67
|
-
] as const;
|
|
68
|
-
|
|
69
|
-
// Derive types from constants for better maintainability
|
|
70
|
-
type EntityEventName = (typeof ENTITY_EVENT_NAMES)[number];
|
|
71
|
-
type AutomationEventName = (typeof AUTOMATION_EVENT_NAMES)[number];
|
|
72
|
-
|
|
73
|
-
// Common fields shared by all context types
|
|
74
|
-
type BaseContext = {
|
|
75
|
-
runId: string;
|
|
76
|
-
eventAction?: string;
|
|
77
|
-
repository: {
|
|
78
|
-
owner: string;
|
|
79
|
-
repo: string;
|
|
80
|
-
full_name: string;
|
|
81
|
-
};
|
|
82
|
-
actor: string;
|
|
83
|
-
inputs: {
|
|
84
|
-
prompt: string;
|
|
85
|
-
triggerPhrase: string;
|
|
86
|
-
assigneeTrigger: string;
|
|
87
|
-
labelTrigger: string;
|
|
88
|
-
baseBranch?: string;
|
|
89
|
-
branchPrefix: string;
|
|
90
|
-
useStickyComment: boolean;
|
|
91
|
-
useCommitSigning: boolean;
|
|
92
|
-
allowedBots: string;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// Context for entity-based events (issues, PRs, comments)
|
|
97
|
-
export type ParsedGitHubContext = BaseContext & {
|
|
98
|
-
eventName: EntityEventName;
|
|
99
|
-
payload:
|
|
100
|
-
| IssuesEvent
|
|
101
|
-
| IssueCommentEvent
|
|
102
|
-
| PullRequestEvent
|
|
103
|
-
| PullRequestReviewEvent
|
|
104
|
-
| PullRequestReviewCommentEvent;
|
|
105
|
-
entityNumber: number;
|
|
106
|
-
isPR: boolean;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
// Context for automation events (workflow_dispatch, schedule, workflow_run, repository_dispatch)
|
|
110
|
-
export type AutomationContext = BaseContext & {
|
|
111
|
-
eventName: AutomationEventName;
|
|
112
|
-
payload: WorkflowDispatchEvent | ScheduleEvent | WorkflowRunEvent | RepositoryDispatchEvent;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// Union type for all contexts
|
|
116
|
-
export type GitHubContext = ParsedGitHubContext | AutomationContext;
|
|
117
|
-
|
|
118
|
-
export function parseGitHubContext(): GitHubContext {
|
|
119
|
-
const context = github.context;
|
|
120
|
-
|
|
121
|
-
const commonFields = {
|
|
122
|
-
runId: process.env.GITHUB_RUN_ID!,
|
|
123
|
-
eventAction: context.payload.action,
|
|
124
|
-
repository: {
|
|
125
|
-
owner: context.repo.owner,
|
|
126
|
-
repo: context.repo.repo,
|
|
127
|
-
full_name: `${context.repo.owner}/${context.repo.repo}`,
|
|
128
|
-
},
|
|
129
|
-
actor: context.actor,
|
|
130
|
-
inputs: {
|
|
131
|
-
prompt: process.env.PROMPT || "",
|
|
132
|
-
triggerPhrase: process.env.TRIGGER_PHRASE ?? "@claude",
|
|
133
|
-
assigneeTrigger: process.env.ASSIGNEE_TRIGGER ?? "",
|
|
134
|
-
labelTrigger: process.env.LABEL_TRIGGER ?? "",
|
|
135
|
-
baseBranch: process.env.BASE_BRANCH,
|
|
136
|
-
branchPrefix: process.env.BRANCH_PREFIX ?? "claude/",
|
|
137
|
-
useStickyComment: process.env.USE_STICKY_COMMENT === "true",
|
|
138
|
-
useCommitSigning: process.env.USE_COMMIT_SIGNING === "true",
|
|
139
|
-
allowedBots: process.env.ALLOWED_BOTS ?? "",
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
switch (context.eventName) {
|
|
144
|
-
case "issues": {
|
|
145
|
-
const payload = context.payload as IssuesEvent;
|
|
146
|
-
return {
|
|
147
|
-
...commonFields,
|
|
148
|
-
eventName: "issues",
|
|
149
|
-
payload,
|
|
150
|
-
entityNumber: payload.issue.number,
|
|
151
|
-
isPR: false,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
case "issue_comment": {
|
|
155
|
-
const payload = context.payload as IssueCommentEvent;
|
|
156
|
-
return {
|
|
157
|
-
...commonFields,
|
|
158
|
-
eventName: "issue_comment",
|
|
159
|
-
payload,
|
|
160
|
-
entityNumber: payload.issue.number,
|
|
161
|
-
isPR: Boolean(payload.issue.pull_request),
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
case "pull_request": {
|
|
165
|
-
const payload = context.payload as PullRequestEvent;
|
|
166
|
-
return {
|
|
167
|
-
...commonFields,
|
|
168
|
-
eventName: "pull_request",
|
|
169
|
-
payload,
|
|
170
|
-
entityNumber: payload.pull_request.number,
|
|
171
|
-
isPR: true,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
case "pull_request_review": {
|
|
175
|
-
const payload = context.payload as PullRequestReviewEvent;
|
|
176
|
-
return {
|
|
177
|
-
...commonFields,
|
|
178
|
-
eventName: "pull_request_review",
|
|
179
|
-
payload,
|
|
180
|
-
entityNumber: payload.pull_request.number,
|
|
181
|
-
isPR: true,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
case "pull_request_review_comment": {
|
|
185
|
-
const payload = context.payload as PullRequestReviewCommentEvent;
|
|
186
|
-
return {
|
|
187
|
-
...commonFields,
|
|
188
|
-
eventName: "pull_request_review_comment",
|
|
189
|
-
payload,
|
|
190
|
-
entityNumber: payload.pull_request.number,
|
|
191
|
-
isPR: true,
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
case "workflow_dispatch": {
|
|
195
|
-
return {
|
|
196
|
-
...commonFields,
|
|
197
|
-
eventName: "workflow_dispatch",
|
|
198
|
-
payload: context.payload as unknown as WorkflowDispatchEvent,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
case "schedule": {
|
|
202
|
-
return {
|
|
203
|
-
...commonFields,
|
|
204
|
-
eventName: "schedule",
|
|
205
|
-
payload: context.payload as unknown as ScheduleEvent,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
case "workflow_run": {
|
|
209
|
-
return {
|
|
210
|
-
...commonFields,
|
|
211
|
-
eventName: "workflow_run",
|
|
212
|
-
payload: context.payload as unknown as WorkflowRunEvent,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
case "repository_dispatch": {
|
|
216
|
-
return {
|
|
217
|
-
...commonFields,
|
|
218
|
-
eventName: "repository_dispatch",
|
|
219
|
-
payload: context.payload as unknown as RepositoryDispatchEvent,
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
default:
|
|
223
|
-
throw new Error(`Unsupported event type: ${context.eventName}`);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export function isIssuesEvent(
|
|
228
|
-
context: GitHubContext,
|
|
229
|
-
): context is ParsedGitHubContext & { payload: IssuesEvent } {
|
|
230
|
-
return context.eventName === "issues";
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export function isIssueCommentEvent(
|
|
234
|
-
context: GitHubContext,
|
|
235
|
-
): context is ParsedGitHubContext & { payload: IssueCommentEvent } {
|
|
236
|
-
return context.eventName === "issue_comment";
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export function isPullRequestEvent(
|
|
240
|
-
context: GitHubContext,
|
|
241
|
-
): context is ParsedGitHubContext & { payload: PullRequestEvent } {
|
|
242
|
-
return context.eventName === "pull_request";
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export function isPullRequestReviewEvent(
|
|
246
|
-
context: GitHubContext,
|
|
247
|
-
): context is ParsedGitHubContext & { payload: PullRequestReviewEvent } {
|
|
248
|
-
return context.eventName === "pull_request_review";
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export function isPullRequestReviewCommentEvent(
|
|
252
|
-
context: GitHubContext,
|
|
253
|
-
): context is ParsedGitHubContext & { payload: PullRequestReviewCommentEvent } {
|
|
254
|
-
return context.eventName === "pull_request_review_comment";
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export function isIssuesAssignedEvent(
|
|
258
|
-
context: GitHubContext,
|
|
259
|
-
): context is ParsedGitHubContext & { payload: IssuesAssignedEvent } {
|
|
260
|
-
return isIssuesEvent(context) && context.eventAction === "assigned";
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Type guard to check if context is an entity context (has entityNumber and isPR)
|
|
264
|
-
export function isEntityContext(
|
|
265
|
-
context: GitHubContext,
|
|
266
|
-
): context is ParsedGitHubContext {
|
|
267
|
-
return ENTITY_EVENT_NAMES.includes(context.eventName as EntityEventName);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// Type guard to check if context is an automation context
|
|
271
|
-
export function isAutomationContext(
|
|
272
|
-
context: GitHubContext,
|
|
273
|
-
): context is AutomationContext {
|
|
274
|
-
return AUTOMATION_EVENT_NAMES.includes(
|
|
275
|
-
context.eventName as AutomationEventName,
|
|
276
|
-
);
|
|
277
|
-
}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { execFileSync } from "child_process";
|
|
2
|
-
import type { Octokits } from "../api/client";
|
|
3
|
-
import { ISSUE_QUERY, PR_QUERY, USER_QUERY } from "../api/queries/github";
|
|
4
|
-
import type {
|
|
5
|
-
GitHubComment,
|
|
6
|
-
GitHubFile,
|
|
7
|
-
GitHubIssue,
|
|
8
|
-
GitHubPullRequest,
|
|
9
|
-
GitHubReview,
|
|
10
|
-
IssueQueryResponse,
|
|
11
|
-
PullRequestQueryResponse,
|
|
12
|
-
} from "../types";
|
|
13
|
-
import type { CommentWithImages } from "../utils/image-downloader";
|
|
14
|
-
import { downloadCommentImages } from "../utils/image-downloader";
|
|
15
|
-
|
|
16
|
-
type FetchDataParams = {
|
|
17
|
-
octokits: Octokits;
|
|
18
|
-
repository: string;
|
|
19
|
-
prNumber: string;
|
|
20
|
-
isPR: boolean;
|
|
21
|
-
triggerUsername?: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type GitHubFileWithSHA = GitHubFile & {
|
|
25
|
-
sha: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type FetchDataResult = {
|
|
29
|
-
contextData: GitHubPullRequest | GitHubIssue;
|
|
30
|
-
comments: GitHubComment[];
|
|
31
|
-
changedFiles: GitHubFile[];
|
|
32
|
-
changedFilesWithSHA: GitHubFileWithSHA[];
|
|
33
|
-
reviewData: { nodes: GitHubReview[] } | null;
|
|
34
|
-
imageUrlMap: Map<string, string>;
|
|
35
|
-
triggerDisplayName?: string | null;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export async function fetchGitHubData({
|
|
39
|
-
octokits,
|
|
40
|
-
repository,
|
|
41
|
-
prNumber,
|
|
42
|
-
isPR,
|
|
43
|
-
triggerUsername,
|
|
44
|
-
}: FetchDataParams): Promise<FetchDataResult> {
|
|
45
|
-
const [owner, repo] = repository.split("/");
|
|
46
|
-
if (!owner || !repo) {
|
|
47
|
-
throw new Error("Invalid repository format. Expected 'owner/repo'.");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
let contextData: GitHubPullRequest | GitHubIssue | null = null;
|
|
51
|
-
let comments: GitHubComment[] = [];
|
|
52
|
-
let changedFiles: GitHubFile[] = [];
|
|
53
|
-
let reviewData: { nodes: GitHubReview[] } | null = null;
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
if (isPR) {
|
|
57
|
-
// Fetch PR data with all comments and file information
|
|
58
|
-
const prResult = await octokits.graphql<PullRequestQueryResponse>(
|
|
59
|
-
PR_QUERY,
|
|
60
|
-
{
|
|
61
|
-
owner,
|
|
62
|
-
repo,
|
|
63
|
-
number: parseInt(prNumber),
|
|
64
|
-
},
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
if (prResult.repository.pullRequest) {
|
|
68
|
-
const pullRequest = prResult.repository.pullRequest;
|
|
69
|
-
contextData = pullRequest;
|
|
70
|
-
changedFiles = pullRequest.files.nodes || [];
|
|
71
|
-
comments = pullRequest.comments?.nodes || [];
|
|
72
|
-
reviewData = pullRequest.reviews || [];
|
|
73
|
-
|
|
74
|
-
console.log(`Successfully fetched PR #${prNumber} data`);
|
|
75
|
-
} else {
|
|
76
|
-
throw new Error(`PR #${prNumber} not found`);
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
// Fetch issue data
|
|
80
|
-
const issueResult = await octokits.graphql<IssueQueryResponse>(
|
|
81
|
-
ISSUE_QUERY,
|
|
82
|
-
{
|
|
83
|
-
owner,
|
|
84
|
-
repo,
|
|
85
|
-
number: parseInt(prNumber),
|
|
86
|
-
},
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
if (issueResult.repository.issue) {
|
|
90
|
-
contextData = issueResult.repository.issue;
|
|
91
|
-
comments = contextData?.comments?.nodes || [];
|
|
92
|
-
|
|
93
|
-
console.log(`Successfully fetched issue #${prNumber} data`);
|
|
94
|
-
} else {
|
|
95
|
-
throw new Error(`Issue #${prNumber} not found`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
} catch (error) {
|
|
99
|
-
console.error(`Failed to fetch ${isPR ? "PR" : "issue"} data:`, error);
|
|
100
|
-
throw new Error(`Failed to fetch ${isPR ? "PR" : "issue"} data`);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Compute SHAs for changed files
|
|
104
|
-
let changedFilesWithSHA: GitHubFileWithSHA[] = [];
|
|
105
|
-
if (isPR && changedFiles.length > 0) {
|
|
106
|
-
changedFilesWithSHA = changedFiles.map((file) => {
|
|
107
|
-
// Don't compute SHA for deleted files
|
|
108
|
-
if (file.changeType === "DELETED") {
|
|
109
|
-
return {
|
|
110
|
-
...file,
|
|
111
|
-
sha: "deleted",
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
try {
|
|
116
|
-
// Use git hash-object to compute the SHA for the current file content
|
|
117
|
-
const sha = execFileSync("git", ["hash-object", file.path], {
|
|
118
|
-
encoding: "utf-8",
|
|
119
|
-
}).trim();
|
|
120
|
-
return {
|
|
121
|
-
...file,
|
|
122
|
-
sha,
|
|
123
|
-
};
|
|
124
|
-
} catch (error) {
|
|
125
|
-
console.warn(`Failed to compute SHA for ${file.path}:`, error);
|
|
126
|
-
// Return original file without SHA if computation fails
|
|
127
|
-
return {
|
|
128
|
-
...file,
|
|
129
|
-
sha: "unknown",
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Prepare all comments for image processing
|
|
136
|
-
const issueComments: CommentWithImages[] = comments
|
|
137
|
-
.filter((c) => c.body && !c.isMinimized)
|
|
138
|
-
.map((c) => ({
|
|
139
|
-
type: "issue_comment" as const,
|
|
140
|
-
id: c.databaseId,
|
|
141
|
-
body: c.body,
|
|
142
|
-
}));
|
|
143
|
-
|
|
144
|
-
const reviewBodies: CommentWithImages[] =
|
|
145
|
-
reviewData?.nodes
|
|
146
|
-
?.filter((r) => r.body)
|
|
147
|
-
.map((r) => ({
|
|
148
|
-
type: "review_body" as const,
|
|
149
|
-
id: r.databaseId,
|
|
150
|
-
pullNumber: prNumber,
|
|
151
|
-
body: r.body,
|
|
152
|
-
})) ?? [];
|
|
153
|
-
|
|
154
|
-
const reviewComments: CommentWithImages[] =
|
|
155
|
-
reviewData?.nodes
|
|
156
|
-
?.flatMap((r) => r.comments?.nodes ?? [])
|
|
157
|
-
.filter((c) => c.body && !c.isMinimized)
|
|
158
|
-
.map((c) => ({
|
|
159
|
-
type: "review_comment" as const,
|
|
160
|
-
id: c.databaseId,
|
|
161
|
-
body: c.body,
|
|
162
|
-
})) ?? [];
|
|
163
|
-
|
|
164
|
-
// Add the main issue/PR body if it has content
|
|
165
|
-
const mainBody: CommentWithImages[] = contextData.body
|
|
166
|
-
? [
|
|
167
|
-
{
|
|
168
|
-
...(isPR
|
|
169
|
-
? {
|
|
170
|
-
type: "pr_body" as const,
|
|
171
|
-
pullNumber: prNumber,
|
|
172
|
-
body: contextData.body,
|
|
173
|
-
}
|
|
174
|
-
: {
|
|
175
|
-
type: "issue_body" as const,
|
|
176
|
-
issueNumber: prNumber,
|
|
177
|
-
body: contextData.body,
|
|
178
|
-
}),
|
|
179
|
-
},
|
|
180
|
-
]
|
|
181
|
-
: [];
|
|
182
|
-
|
|
183
|
-
const allComments = [
|
|
184
|
-
...mainBody,
|
|
185
|
-
...issueComments,
|
|
186
|
-
...reviewBodies,
|
|
187
|
-
...reviewComments,
|
|
188
|
-
];
|
|
189
|
-
|
|
190
|
-
const imageUrlMap = await downloadCommentImages(
|
|
191
|
-
octokits,
|
|
192
|
-
owner,
|
|
193
|
-
repo,
|
|
194
|
-
allComments,
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
// Fetch trigger user display name if username is provided
|
|
198
|
-
let triggerDisplayName: string | null | undefined;
|
|
199
|
-
if (triggerUsername) {
|
|
200
|
-
triggerDisplayName = await fetchUserDisplayName(octokits, triggerUsername);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return {
|
|
204
|
-
contextData,
|
|
205
|
-
comments,
|
|
206
|
-
changedFiles,
|
|
207
|
-
changedFilesWithSHA,
|
|
208
|
-
reviewData,
|
|
209
|
-
imageUrlMap,
|
|
210
|
-
triggerDisplayName,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export type UserQueryResponse = {
|
|
215
|
-
user: {
|
|
216
|
-
name: string | null;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export async function fetchUserDisplayName(
|
|
221
|
-
octokits: Octokits,
|
|
222
|
-
login: string,
|
|
223
|
-
): Promise<string | null> {
|
|
224
|
-
try {
|
|
225
|
-
const result = await octokits.graphql<UserQueryResponse>(USER_QUERY, {
|
|
226
|
-
login,
|
|
227
|
-
});
|
|
228
|
-
return result.user.name;
|
|
229
|
-
} catch (error) {
|
|
230
|
-
console.warn(`Failed to fetch user display name for ${login}:`, error);
|
|
231
|
-
return null;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
GitHubPullRequest,
|
|
3
|
-
GitHubIssue,
|
|
4
|
-
GitHubComment,
|
|
5
|
-
GitHubFile,
|
|
6
|
-
GitHubReview,
|
|
7
|
-
} from "../types";
|
|
8
|
-
import type { GitHubFileWithSHA } from "./fetcher";
|
|
9
|
-
import { sanitizeContent } from "../utils/sanitizer";
|
|
10
|
-
|
|
11
|
-
export function formatContext(
|
|
12
|
-
contextData: GitHubPullRequest | GitHubIssue,
|
|
13
|
-
isPR: boolean,
|
|
14
|
-
): string {
|
|
15
|
-
if (isPR) {
|
|
16
|
-
const prData = contextData as GitHubPullRequest;
|
|
17
|
-
return `PR Title: ${prData.title}
|
|
18
|
-
PR Author: ${prData.author.login}
|
|
19
|
-
PR Branch: ${prData.headRefName} -> ${prData.baseRefName}
|
|
20
|
-
PR State: ${prData.state}
|
|
21
|
-
PR Additions: ${prData.additions}
|
|
22
|
-
PR Deletions: ${prData.deletions}
|
|
23
|
-
Total Commits: ${prData.commits.totalCount}
|
|
24
|
-
Changed Files: ${prData.files.nodes.length} files`;
|
|
25
|
-
} else {
|
|
26
|
-
const issueData = contextData as GitHubIssue;
|
|
27
|
-
return `Issue Title: ${issueData.title}
|
|
28
|
-
Issue Author: ${issueData.author.login}
|
|
29
|
-
Issue State: ${issueData.state}`;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function formatBody(
|
|
34
|
-
body: string,
|
|
35
|
-
imageUrlMap: Map<string, string>,
|
|
36
|
-
): string {
|
|
37
|
-
let processedBody = body;
|
|
38
|
-
|
|
39
|
-
for (const [originalUrl, localPath] of imageUrlMap) {
|
|
40
|
-
processedBody = processedBody.replaceAll(originalUrl, localPath);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
processedBody = sanitizeContent(processedBody);
|
|
44
|
-
|
|
45
|
-
return processedBody;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function formatComments(
|
|
49
|
-
comments: GitHubComment[],
|
|
50
|
-
imageUrlMap?: Map<string, string>,
|
|
51
|
-
): string {
|
|
52
|
-
return comments
|
|
53
|
-
.filter((comment) => !comment.isMinimized)
|
|
54
|
-
.map((comment) => {
|
|
55
|
-
let body = comment.body;
|
|
56
|
-
|
|
57
|
-
if (imageUrlMap && body) {
|
|
58
|
-
for (const [originalUrl, localPath] of imageUrlMap) {
|
|
59
|
-
body = body.replaceAll(originalUrl, localPath);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
body = sanitizeContent(body);
|
|
64
|
-
|
|
65
|
-
return `[${comment.author.login} at ${comment.createdAt}]: ${body}`;
|
|
66
|
-
})
|
|
67
|
-
.join("\n\n");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function formatReviewComments(
|
|
71
|
-
reviewData: { nodes: GitHubReview[] } | null,
|
|
72
|
-
imageUrlMap?: Map<string, string>,
|
|
73
|
-
): string {
|
|
74
|
-
if (!reviewData || !reviewData.nodes) {
|
|
75
|
-
return "";
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const formattedReviews = reviewData.nodes.map((review) => {
|
|
79
|
-
let reviewOutput = `[Review by ${review.author.login} at ${review.submittedAt}]: ${review.state}`;
|
|
80
|
-
|
|
81
|
-
if (review.body && review.body.trim()) {
|
|
82
|
-
let body = review.body;
|
|
83
|
-
|
|
84
|
-
if (imageUrlMap) {
|
|
85
|
-
for (const [originalUrl, localPath] of imageUrlMap) {
|
|
86
|
-
body = body.replaceAll(originalUrl, localPath);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const sanitizedBody = sanitizeContent(body);
|
|
91
|
-
reviewOutput += `\n${sanitizedBody}`;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
review.comments &&
|
|
96
|
-
review.comments.nodes &&
|
|
97
|
-
review.comments.nodes.length > 0
|
|
98
|
-
) {
|
|
99
|
-
const comments = review.comments.nodes
|
|
100
|
-
.filter((comment) => !comment.isMinimized)
|
|
101
|
-
.map((comment) => {
|
|
102
|
-
let body = comment.body;
|
|
103
|
-
|
|
104
|
-
if (imageUrlMap) {
|
|
105
|
-
for (const [originalUrl, localPath] of imageUrlMap) {
|
|
106
|
-
body = body.replaceAll(originalUrl, localPath);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
body = sanitizeContent(body);
|
|
111
|
-
|
|
112
|
-
return ` [Comment on ${comment.path}:${comment.line || "?"}]: ${body}`;
|
|
113
|
-
})
|
|
114
|
-
.join("\n");
|
|
115
|
-
if (comments) {
|
|
116
|
-
reviewOutput += `\n${comments}`;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return reviewOutput;
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
return formattedReviews.join("\n\n");
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function formatChangedFiles(changedFiles: GitHubFile[]): string {
|
|
127
|
-
return changedFiles
|
|
128
|
-
.map(
|
|
129
|
-
(file) =>
|
|
130
|
-
`- ${file.path} (${file.changeType}) +${file.additions}/-${file.deletions}`,
|
|
131
|
-
)
|
|
132
|
-
.join("\n");
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export function formatChangedFilesWithSHA(
|
|
136
|
-
changedFiles: GitHubFileWithSHA[],
|
|
137
|
-
): string {
|
|
138
|
-
return changedFiles
|
|
139
|
-
.map(
|
|
140
|
-
(file) =>
|
|
141
|
-
`- ${file.path} (${file.changeType}) +${file.additions}/-${file.deletions} SHA: ${file.sha}`,
|
|
142
|
-
)
|
|
143
|
-
.join("\n");
|
|
144
|
-
}
|