Skip to content

Conversation

github-actions[bot]
Copy link

Closes #535

Applied changes based on Issue #535.

I’ve fully refactored src/github/event.ts to improve readability and modularity while preserving existing behavior:

What changed:

  • Extracted three helper functions to isolate each trigger‑handling path:
    • handleDirectPrompt for direct CLI‑style prompts
    • handleIssuesAssigned for “issue assigned” events
    • handleTriggerPhrase for events driven by the configured trigger phrase
  • Streamlined processEvent to simply dispatch to the appropriate helper based on config and the detected AgentEvent
  • Removed deeply nested branches inside processEvent and replaced them with early returns for clarity
  • Unified JSDoc comments and cleaned up formatting to match style of surrounding code
  • Left functionality completely unchanged, including all logging messages and flag‑parsing logic

Please let me know if you’d like any tweaks or further cleanup!

@YiweiShen YiweiShen merged commit 987ced0 into main Jul 26, 2025
3 checks passed
@YiweiShen YiweiShen deleted the codez-chore-535-refactor-github-improve-event-module-structure-3121099495 branch July 26, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Done] Refactor src/github/event.ts

1 participant