refactor: delegate pr-impact-analysis to Cloudflare Worker#82
refactor: delegate pr-impact-analysis to Cloudflare Worker#82originalix wants to merge 2 commits intoOneKeyHQ:mainfrom
Conversation
Simplify the GitHub Action to a thin client that collects PR data and POSTs to a Cloudflare Worker. All LLM analysis, Jira dedup, and issue creation logic now lives in the Worker. - Reduce inputs from 11 to 3 (github-token, worker-url, worker-secret) - Upgrade runtime from node16 to node20 - Remove analyzer.js and jira.js (moved to Worker) - Keep github.js unchanged (PR data + diff collection) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f58db3a73
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| core.setOutput('jira-issue-key', data.jiraIssueKey || ''); | ||
| core.setOutput('jira-issue-url', data.jiraIssueUrl || ''); | ||
| core.setOutput('analysis-summary', data.analysisSummary || ''); | ||
| core.setOutput('skipped', String(data.skipped)); |
There was a problem hiding this comment.
Validate skipped output is boolean before publishing
The action writes skipped as String(data.skipped) without validating the worker response shape, so a partial response like { "success": true } produces the literal output "undefined" even though action.yml documents this output as true/false. Downstream workflow conditions that compare steps.<id>.outputs.skipped to 'true'/'false' will misroute while the step still reports success, making worker contract drift hard to detect.
Useful? React with 👍 / 👎.
| core.setOutput('jira-issue-key', data.jiraIssueKey || ''); | ||
| core.setOutput('jira-issue-url', data.jiraIssueUrl || ''); |
There was a problem hiding this comment.
Reject non-skipped success responses without Jira key
After data.success passes, the code always sets outputs and exits successfully even when data.skipped is false but jiraIssueKey/jiraIssueUrl are empty; this silently reports "Done" while no QA ticket was actually created. In the previous in-action flow, Jira creation failures threw and failed the job, so this introduces a regression where worker-side creation errors can be masked as successful runs.
Useful? React with 👍 / 👎.
Summary
pr-impact-analysisGitHub Action from a full analysis engine to a thin HTTP clientgithub-token,worker-url,worker-secret)node16tonode20analyzer.js(168 lines) andjira.js(115 lines), keepgithub.jsunchangedTest plan
🤖 Generated with Claude Code