@vicoa/cli 1.3.21-win32-x64 → 1.3.21

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.
Files changed (250) hide show
  1. package/README.md +82 -0
  2. package/bin/vicoa.js +38 -0
  3. package/package.json +29 -10
  4. package/bin/_internal/81d243bd2c585b0f4821__mypyc.cp312-win_amd64.pyd +0 -0
  5. package/bin/_internal/VCRUNTIME140.dll +0 -0
  6. package/bin/_internal/VCRUNTIME140_1.dll +0 -0
  7. package/bin/_internal/_asyncio.pyd +0 -0
  8. package/bin/_internal/_bz2.pyd +0 -0
  9. package/bin/_internal/_cffi_backend.cp312-win_amd64.pyd +0 -0
  10. package/bin/_internal/_ctypes.pyd +0 -0
  11. package/bin/_internal/_decimal.pyd +0 -0
  12. package/bin/_internal/_hashlib.pyd +0 -0
  13. package/bin/_internal/_lzma.pyd +0 -0
  14. package/bin/_internal/_multiprocessing.pyd +0 -0
  15. package/bin/_internal/_overlapped.pyd +0 -0
  16. package/bin/_internal/_queue.pyd +0 -0
  17. package/bin/_internal/_socket.pyd +0 -0
  18. package/bin/_internal/_ssl.pyd +0 -0
  19. package/bin/_internal/_uuid.pyd +0 -0
  20. package/bin/_internal/_wmi.pyd +0 -0
  21. package/bin/_internal/_zoneinfo.pyd +0 -0
  22. package/bin/_internal/aiohttp/_http_parser.cp312-win_amd64.pyd +0 -0
  23. package/bin/_internal/aiohttp/_http_writer.cp312-win_amd64.pyd +0 -0
  24. package/bin/_internal/aiohttp/_websocket/mask.cp312-win_amd64.pyd +0 -0
  25. package/bin/_internal/aiohttp/_websocket/reader_c.cp312-win_amd64.pyd +0 -0
  26. package/bin/_internal/api-ms-win-core-console-l1-1-0.dll +0 -0
  27. package/bin/_internal/api-ms-win-core-datetime-l1-1-0.dll +0 -0
  28. package/bin/_internal/api-ms-win-core-debug-l1-1-0.dll +0 -0
  29. package/bin/_internal/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
  30. package/bin/_internal/api-ms-win-core-fibers-l1-1-0.dll +0 -0
  31. package/bin/_internal/api-ms-win-core-fibers-l1-1-1.dll +0 -0
  32. package/bin/_internal/api-ms-win-core-file-l1-1-0.dll +0 -0
  33. package/bin/_internal/api-ms-win-core-file-l1-2-0.dll +0 -0
  34. package/bin/_internal/api-ms-win-core-file-l2-1-0.dll +0 -0
  35. package/bin/_internal/api-ms-win-core-handle-l1-1-0.dll +0 -0
  36. package/bin/_internal/api-ms-win-core-heap-l1-1-0.dll +0 -0
  37. package/bin/_internal/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
  38. package/bin/_internal/api-ms-win-core-kernel32-legacy-l1-1-1.dll +0 -0
  39. package/bin/_internal/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
  40. package/bin/_internal/api-ms-win-core-localization-l1-2-0.dll +0 -0
  41. package/bin/_internal/api-ms-win-core-memory-l1-1-0.dll +0 -0
  42. package/bin/_internal/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
  43. package/bin/_internal/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
  44. package/bin/_internal/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
  45. package/bin/_internal/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
  46. package/bin/_internal/api-ms-win-core-profile-l1-1-0.dll +0 -0
  47. package/bin/_internal/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
  48. package/bin/_internal/api-ms-win-core-string-l1-1-0.dll +0 -0
  49. package/bin/_internal/api-ms-win-core-synch-l1-1-0.dll +0 -0
  50. package/bin/_internal/api-ms-win-core-synch-l1-2-0.dll +0 -0
  51. package/bin/_internal/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
  52. package/bin/_internal/api-ms-win-core-sysinfo-l1-2-0.dll +0 -0
  53. package/bin/_internal/api-ms-win-core-timezone-l1-1-0.dll +0 -0
  54. package/bin/_internal/api-ms-win-core-util-l1-1-0.dll +0 -0
  55. package/bin/_internal/api-ms-win-crt-conio-l1-1-0.dll +0 -0
  56. package/bin/_internal/api-ms-win-crt-convert-l1-1-0.dll +0 -0
  57. package/bin/_internal/api-ms-win-crt-environment-l1-1-0.dll +0 -0
  58. package/bin/_internal/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
  59. package/bin/_internal/api-ms-win-crt-heap-l1-1-0.dll +0 -0
  60. package/bin/_internal/api-ms-win-crt-locale-l1-1-0.dll +0 -0
  61. package/bin/_internal/api-ms-win-crt-math-l1-1-0.dll +0 -0
  62. package/bin/_internal/api-ms-win-crt-process-l1-1-0.dll +0 -0
  63. package/bin/_internal/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
  64. package/bin/_internal/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
  65. package/bin/_internal/api-ms-win-crt-string-l1-1-0.dll +0 -0
  66. package/bin/_internal/api-ms-win-crt-time-l1-1-0.dll +0 -0
  67. package/bin/_internal/api-ms-win-crt-utility-l1-1-0.dll +0 -0
  68. package/bin/_internal/attrs-26.1.0.dist-info/INSTALLER +0 -1
  69. package/bin/_internal/attrs-26.1.0.dist-info/METADATA +0 -199
  70. package/bin/_internal/attrs-26.1.0.dist-info/RECORD +0 -55
  71. package/bin/_internal/attrs-26.1.0.dist-info/WHEEL +0 -4
  72. package/bin/_internal/attrs-26.1.0.dist-info/licenses/LICENSE +0 -21
  73. package/bin/_internal/base_library.zip +0 -0
  74. package/bin/_internal/certifi/cacert.pem +0 -3933
  75. package/bin/_internal/certifi/py.typed +0 -0
  76. package/bin/_internal/charset_normalizer/cd.cp312-win_amd64.pyd +0 -0
  77. package/bin/_internal/charset_normalizer/md.cp312-win_amd64.pyd +0 -0
  78. package/bin/_internal/click-8.3.3.dist-info/INSTALLER +0 -1
  79. package/bin/_internal/click-8.3.3.dist-info/METADATA +0 -84
  80. package/bin/_internal/click-8.3.3.dist-info/RECORD +0 -40
  81. package/bin/_internal/click-8.3.3.dist-info/WHEEL +0 -4
  82. package/bin/_internal/click-8.3.3.dist-info/licenses/LICENSE.txt +0 -28
  83. package/bin/_internal/cryptography/hazmat/bindings/_rust.pyd +0 -0
  84. package/bin/_internal/cryptography-48.0.0.dist-info/INSTALLER +0 -1
  85. package/bin/_internal/cryptography-48.0.0.dist-info/METADATA +0 -110
  86. package/bin/_internal/cryptography-48.0.0.dist-info/RECORD +0 -195
  87. package/bin/_internal/cryptography-48.0.0.dist-info/WHEEL +0 -4
  88. package/bin/_internal/cryptography-48.0.0.dist-info/licenses/LICENSE +0 -3
  89. package/bin/_internal/cryptography-48.0.0.dist-info/licenses/LICENSE.APACHE +0 -202
  90. package/bin/_internal/cryptography-48.0.0.dist-info/licenses/LICENSE.BSD +0 -27
  91. package/bin/_internal/cryptography-48.0.0.dist-info/sboms/cryptography-rust.cyclonedx.json +0 -1362
  92. package/bin/_internal/cryptography-48.0.0.dist-info/sboms/sbom.json +0 -43
  93. package/bin/_internal/fastmcp-2.9.2.dist-info/INSTALLER +0 -1
  94. package/bin/_internal/fastmcp-2.9.2.dist-info/METADATA +0 -465
  95. package/bin/_internal/fastmcp-2.9.2.dist-info/RECORD +0 -149
  96. package/bin/_internal/fastmcp-2.9.2.dist-info/WHEEL +0 -4
  97. package/bin/_internal/fastmcp-2.9.2.dist-info/entry_points.txt +0 -2
  98. package/bin/_internal/fastmcp-2.9.2.dist-info/licenses/LICENSE +0 -201
  99. package/bin/_internal/frozenlist/_frozenlist.cp312-win_amd64.pyd +0 -0
  100. package/bin/_internal/integrations/cli_wrappers/IMPORTANT_USE_CASES.md +0 -33
  101. package/bin/_internal/integrations/github/claude-code-action/CLAUDE.md +0 -136
  102. package/bin/_internal/integrations/github/claude-code-action/CODE_OF_CONDUCT.md +0 -128
  103. package/bin/_internal/integrations/github/claude-code-action/CONTRIBUTING.md +0 -116
  104. package/bin/_internal/integrations/github/claude-code-action/LICENSE +0 -21
  105. package/bin/_internal/integrations/github/claude-code-action/README.md +0 -53
  106. package/bin/_internal/integrations/github/claude-code-action/ROADMAP.md +0 -20
  107. package/bin/_internal/integrations/github/claude-code-action/SECURITY.md +0 -15
  108. package/bin/_internal/integrations/github/claude-code-action/action.yml +0 -294
  109. package/bin/_internal/integrations/github/claude-code-action/base-action/CLAUDE.md +0 -60
  110. package/bin/_internal/integrations/github/claude-code-action/base-action/CODE_OF_CONDUCT.md +0 -128
  111. package/bin/_internal/integrations/github/claude-code-action/base-action/CONTRIBUTING.md +0 -136
  112. package/bin/_internal/integrations/github/claude-code-action/base-action/LICENSE +0 -21
  113. package/bin/_internal/integrations/github/claude-code-action/base-action/MIRROR_DISCLAIMER.md +0 -11
  114. package/bin/_internal/integrations/github/claude-code-action/base-action/README.md +0 -521
  115. package/bin/_internal/integrations/github/claude-code-action/base-action/action.yml +0 -149
  116. package/bin/_internal/integrations/github/claude-code-action/base-action/bun.lock +0 -54
  117. package/bin/_internal/integrations/github/claude-code-action/base-action/examples/issue-triage.yml +0 -108
  118. package/bin/_internal/integrations/github/claude-code-action/base-action/package.json +0 -23
  119. package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/install-hooks.sh +0 -13
  120. package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/pre-push +0 -46
  121. package/bin/_internal/integrations/github/claude-code-action/base-action/src/index.ts +0 -82
  122. package/bin/_internal/integrations/github/claude-code-action/base-action/src/prepare-prompt.ts +0 -82
  123. package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-claude.ts +0 -257
  124. package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-vicoa.ts +0 -301
  125. package/bin/_internal/integrations/github/claude-code-action/base-action/src/setup-claude-code-settings.ts +0 -68
  126. package/bin/_internal/integrations/github/claude-code-action/base-action/src/validate-env.ts +0 -54
  127. package/bin/_internal/integrations/github/claude-code-action/base-action/test-local.sh +0 -12
  128. package/bin/_internal/integrations/github/claude-code-action/base-action/test-mcp-local.sh +0 -18
  129. package/bin/_internal/integrations/github/claude-code-action/base-action/tsconfig.json +0 -30
  130. package/bin/_internal/integrations/github/claude-code-action/bun.lock +0 -384
  131. package/bin/_internal/integrations/github/claude-code-action/docs/capabilities-and-limitations.md +0 -33
  132. package/bin/_internal/integrations/github/claude-code-action/docs/cloud-providers.md +0 -99
  133. package/bin/_internal/integrations/github/claude-code-action/docs/configuration.md +0 -345
  134. package/bin/_internal/integrations/github/claude-code-action/docs/custom-automations.md +0 -113
  135. package/bin/_internal/integrations/github/claude-code-action/docs/experimental.md +0 -128
  136. package/bin/_internal/integrations/github/claude-code-action/docs/faq.md +0 -205
  137. package/bin/_internal/integrations/github/claude-code-action/docs/migration-guide.md +0 -261
  138. package/bin/_internal/integrations/github/claude-code-action/docs/security.md +0 -38
  139. package/bin/_internal/integrations/github/claude-code-action/docs/setup.md +0 -146
  140. package/bin/_internal/integrations/github/claude-code-action/docs/usage.md +0 -213
  141. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/auto-fix-ci.yml +0 -97
  142. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/commands/fix-ci.md +0 -127
  143. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/auto-fix-ci-signed.yml +0 -97
  144. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/commands/fix-ci-signed.md +0 -148
  145. package/bin/_internal/integrations/github/claude-code-action/examples/issue-deduplication.yml +0 -63
  146. package/bin/_internal/integrations/github/claude-code-action/examples/issue-triage.yml +0 -75
  147. package/bin/_internal/integrations/github/claude-code-action/examples/vicoa.yml +0 -75
  148. package/bin/_internal/integrations/github/claude-code-action/package.json +0 -31
  149. package/bin/_internal/integrations/github/claude-code-action/scripts/install-hooks.sh +0 -13
  150. package/bin/_internal/integrations/github/claude-code-action/scripts/pre-commit +0 -46
  151. package/bin/_internal/integrations/github/claude-code-action/scripts/setup-network-restrictions.sh +0 -123
  152. package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/index.ts +0 -799
  153. package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/types.ts +0 -102
  154. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/collect-inputs.ts +0 -58
  155. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/format-turns.ts +0 -465
  156. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/prepare.ts +0 -98
  157. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/update-comment-link.ts +0 -245
  158. package/bin/_internal/integrations/github/claude-code-action/src/github/api/client.ts +0 -23
  159. package/bin/_internal/integrations/github/claude-code-action/src/github/api/config.ts +0 -4
  160. package/bin/_internal/integrations/github/claude-code-action/src/github/api/queries/github.ts +0 -117
  161. package/bin/_internal/integrations/github/claude-code-action/src/github/context.ts +0 -277
  162. package/bin/_internal/integrations/github/claude-code-action/src/github/data/fetcher.ts +0 -233
  163. package/bin/_internal/integrations/github/claude-code-action/src/github/data/formatter.ts +0 -144
  164. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch-cleanup.ts +0 -132
  165. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch.ts +0 -163
  166. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comment-logic.ts +0 -203
  167. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/common.ts +0 -33
  168. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/create-initial.ts +0 -111
  169. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-claude-comment.ts +0 -70
  170. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-with-branch.ts +0 -57
  171. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/git-config.ts +0 -62
  172. package/bin/_internal/integrations/github/claude-code-action/src/github/token.ts +0 -108
  173. package/bin/_internal/integrations/github/claude-code-action/src/github/types.ts +0 -98
  174. package/bin/_internal/integrations/github/claude-code-action/src/github/utils/image-downloader.ts +0 -246
  175. package/bin/_internal/integrations/github/claude-code-action/src/github/utils/sanitizer.ts +0 -100
  176. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/actor.ts +0 -64
  177. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/permissions.ts +0 -47
  178. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/trigger.ts +0 -148
  179. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-actions-server.ts +0 -279
  180. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-comment-server.ts +0 -101
  181. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-file-ops-server.ts +0 -677
  182. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-inline-comment-server.ts +0 -184
  183. package/bin/_internal/integrations/github/claude-code-action/src/mcp/install-mcp-server.ts +0 -201
  184. package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/index.ts +0 -152
  185. package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/parse-tools.ts +0 -22
  186. package/bin/_internal/integrations/github/claude-code-action/src/modes/detector.ts +0 -66
  187. package/bin/_internal/integrations/github/claude-code-action/src/modes/registry.ts +0 -54
  188. package/bin/_internal/integrations/github/claude-code-action/src/modes/tag/index.ts +0 -187
  189. package/bin/_internal/integrations/github/claude-code-action/src/modes/types.ts +0 -100
  190. package/bin/_internal/integrations/github/claude-code-action/src/prepare/index.ts +0 -20
  191. package/bin/_internal/integrations/github/claude-code-action/src/prepare/types.ts +0 -20
  192. package/bin/_internal/integrations/github/claude-code-action/src/utils/retry.ts +0 -40
  193. package/bin/_internal/integrations/github/claude-code-action/tsconfig.json +0 -30
  194. package/bin/_internal/integrations/n8n/LICENSE +0 -21
  195. package/bin/_internal/integrations/n8n/README.md +0 -298
  196. package/bin/_internal/integrations/n8n/package-lock.json +0 -2989
  197. package/bin/_internal/integrations/n8n/package.json +0 -68
  198. package/bin/_internal/integrations/n8n/src/credentials/OmnaraApi.credentials.ts +0 -52
  199. package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.json +0 -35
  200. package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.ts +0 -304
  201. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/index.ts +0 -37
  202. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/send.operation.ts +0 -151
  203. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/sendAndWait.operation.ts +0 -252
  204. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/end.operation.ts +0 -56
  205. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/index.ts +0 -29
  206. package/bin/_internal/integrations/n8n/src/nodes/Omnara/vicoa.png +0 -0
  207. package/bin/_internal/integrations/n8n/src/utils/GenericFunctions.ts +0 -93
  208. package/bin/_internal/integrations/n8n/src/utils/sendAndWait/configureWaitTillDate.ts +0 -42
  209. package/bin/_internal/integrations/n8n/src/utils/sendAndWait/descriptions.ts +0 -20
  210. package/bin/_internal/integrations/n8n/src/utils/sendAndWaitWebhook.ts +0 -72
  211. package/bin/_internal/integrations/n8n/tsconfig.json +0 -20
  212. package/bin/_internal/jiter/jiter.cp312-win_amd64.pyd +0 -0
  213. package/bin/_internal/libcrypto-3.dll +0 -0
  214. package/bin/_internal/libffi-8.dll +0 -0
  215. package/bin/_internal/libssl-3.dll +0 -0
  216. package/bin/_internal/mcp-1.9.4.dist-info/INSTALLER +0 -1
  217. package/bin/_internal/mcp-1.9.4.dist-info/METADATA +0 -939
  218. package/bin/_internal/mcp-1.9.4.dist-info/RECORD +0 -154
  219. package/bin/_internal/mcp-1.9.4.dist-info/WHEEL +0 -4
  220. package/bin/_internal/mcp-1.9.4.dist-info/entry_points.txt +0 -2
  221. package/bin/_internal/mcp-1.9.4.dist-info/licenses/LICENSE +0 -21
  222. package/bin/_internal/multidict/_multidict.cp312-win_amd64.pyd +0 -0
  223. package/bin/_internal/propcache/_helpers_c.cp312-win_amd64.pyd +0 -0
  224. package/bin/_internal/pydantic_core/_pydantic_core.cp312-win_amd64.pyd +0 -0
  225. package/bin/_internal/pyexpat.pyd +0 -0
  226. package/bin/_internal/python3.dll +0 -0
  227. package/bin/_internal/python312.dll +0 -0
  228. package/bin/_internal/select.pyd +0 -0
  229. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
  230. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
  231. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD +0 -21
  232. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED +0 -0
  233. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL +0 -5
  234. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
  235. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
  236. package/bin/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +0 -2
  237. package/bin/_internal/ucrtbase.dll +0 -0
  238. package/bin/_internal/unicodedata.pyd +0 -0
  239. package/bin/_internal/vicoa/_bin/README.md +0 -28
  240. package/bin/_internal/vicoa-1.3.21.dist-info/INSTALLER +0 -1
  241. package/bin/_internal/vicoa-1.3.21.dist-info/METADATA +0 -313
  242. package/bin/_internal/vicoa-1.3.21.dist-info/RECORD +0 -11
  243. package/bin/_internal/vicoa-1.3.21.dist-info/REQUESTED +0 -0
  244. package/bin/_internal/vicoa-1.3.21.dist-info/WHEEL +0 -5
  245. package/bin/_internal/vicoa-1.3.21.dist-info/direct_url.json +0 -1
  246. package/bin/_internal/vicoa-1.3.21.dist-info/entry_points.txt +0 -2
  247. package/bin/_internal/vicoa-1.3.21.dist-info/licenses/LICENSE +0 -201
  248. package/bin/_internal/vicoa-1.3.21.dist-info/top_level.txt +0 -3
  249. package/bin/_internal/yarl/_quoting_c.cp312-win_amd64.pyd +0 -0
  250. 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
- }