Commit Graph

17 Commits

Author SHA1 Message Date
Harry 637944f5f6 refactor: update parameter descriptions to improve clarity across multiple YAML files 2025-10-21 17:27:47 +08:00
Harry 71e0739025 fix: change parameter type from select to checkbox in star.yaml 2025-10-21 11:47:07 +08:00
Harry 8d32dfb347 refactor: add payload to event handler's on_event function 2025-10-20 12:04:43 +08:00
Harry cad974b207 feat: enhance GitHub trigger plugin with user ID tracking and event updates
- Added user_id field to EventDispatch and TriggerDispatchResponse models to track the user triggering events.
- Updated GitHub trigger provider to include user_id in event dispatching.
- Modified star event parameters in YAML to simplify naming conventions from "star_created" and "star_deleted" to "created" and "deleted".
- Bumped plugin version in manifest.yaml from 1.3.5 to 1.3.6 to reflect these changes.
2025-10-17 20:58:56 +08:00
Yeuoly ec58236521 fix: apply ruff 2025-10-17 17:42:23 +08:00
Harry 6220b50946 chore: update GitHub trigger plugin version and remove deprecated issue comment events
- Bumped version from 1.3.0 to 1.3.1 in the manifest.
- Removed deprecated issue comment events: issue_comment_created, issue_comment_edited, issue_comment_deleted.
- Consolidated issue comment handling into a unified structure for better maintainability.
- Updated README to reflect changes in event handling and provide clearer setup instructions.
2025-10-16 17:39:50 +08:00
Harry 7dcaee5bc4 refactor: remove star created and deleted events from GitHub trigger
- Deleted the StarCreatedEvent and StarDeletedEvent classes along with their corresponding YAML configurations.
- Updated the GitHub trigger provider to simplify star event handling by consolidating to a single star event type.

These changes streamline the event structure and improve maintainability.
2025-10-15 17:31:48 +08:00
Harry 9bbbf70423 refactor: update event description type and clean up YAML files
- Changed the type of the event description in EventConfiguration from EventDescription to I18nObject for better internationalization support.
- Updated related test cases to reflect this change.
- Simplified the description fields in various issue and star event YAML files by removing redundant human and llm sections, retaining only the essential translations.

These changes enhance the clarity and maintainability of event configurations and improve support for multiple languages.
2025-10-13 20:48:51 +08:00
Harry 8103c9e6ac chore: bump GitHub trigger plugin version to 1.2.1 and add time_range parameter
- Updated the version in manifest.yaml from 1.1.3 to 1.2.1.
- Added a new optional parameter 'time_range' in star_created.yaml to allow triggering based on a specified time range for stars.

These changes ensure the plugin is up-to-date and enhance the configurability of the star event trigger.
2025-10-11 21:19:46 +08:00
Harry 8cdd62509d refactor: enhance trigger subscription handling and improve type annotations
- Updated the PluginExecutor and related classes to improve type annotations and clarity, particularly in methods handling OAuth credentials and trigger subscriptions.
- Refactored the PluginRegistration and TriggerFactory classes to streamline the retrieval of trigger providers and event handlers, ensuring better type safety and consistency.
- Adjusted the YAML loader function to specify return types, enhancing code readability and maintainability.

These changes improve the overall structure and usability of the trigger subscription system, making it more robust and easier to understand.
2025-10-11 21:09:12 +08:00
Harry d6fa7bfb7e chore: bump dify_plugin version to 0.6.0b7 and update trigger event handling
- Updated the version in pyproject.toml from 0.6.0b6 to 0.6.0b7.
- Renamed trigger-related methods and classes for clarity, changing invoke_trigger to invoke_trigger_event and updating associated request and response classes.
- Adjusted event handling in the GithubTrigger class to improve event dispatching.

These changes ensure the plugin is up-to-date and enhance the clarity and functionality of event handling.
2025-10-10 19:31:28 +08:00
Harry ec9bb73fbe refactor: streamline trigger imports and enhance plugin registration logic
- Simplified import statements across various files by reordering and consolidating imports for better readability.
- Refactored the PluginRegistration class to improve the clarity of the configuration handling logic, ensuring more concise checks for subscription constructors.

These changes enhance code maintainability and readability throughout the plugin structure.
2025-10-10 14:31:49 +08:00
Harry 656037254e chore: bump dify_plugin version to 0.6.0b6 in pyproject.toml
- Updated the version of dify_plugin from 0.6.0b5 to 0.6.0b6 in pyproject.toml.

This change ensures that the project dependencies are aligned with the latest plugin version.
2025-10-10 13:10:44 +08:00
Harry aba2f88492 refactor: update event handling and parameter types in GitHub trigger
- Introduced new event mappings for issue comments in the GithubTrigger class, enhancing event handling capabilities.
- Updated the TriggerSubscribeRequest to allow for optional selected_events.
- Modified the YAML configuration to change the 'triggers' parameter to 'events' and added options for issue comments.

These changes improve the flexibility and clarity of event handling in the GitHub trigger implementation.
2025-10-09 17:44:44 +08:00
Harry 644b76ba6e feat: expand GitHub issue trigger events in provider
- Added new event mappings for issue closed, reopened, edited, labeled, unlabeled, assigned, and unassigned in the GithubTrigger class.
- Updated the YAML configuration to include the new events for subscription.

These changes enhance the GitHub trigger functionality by supporting a broader range of issue events, improving responsiveness to user interactions.
2025-10-09 16:52:45 +08:00
Harry 3fe764c6d2 refactor: update terminology in PluginExecutor and TriggerDispatchResponse
- Renamed the 'triggers' attribute to 'events' in TriggerDispatchResponse for consistency with event terminology.
- Updated method signatures in IssueOpenedEvent to use Mapping instead of dict for better type clarity.

These changes enhance the coherence of the codebase and align with the recent terminology updates across the project.
2025-10-09 14:48:44 +08:00
Harry a9b6abf9fc refactor: update trigger and event terminology across the codebase
- Renamed classes and methods related to triggers to use "Event" terminology for consistency and clarity.
- Updated the PluginExecutor, PluginRegistration, and TriggerFactory to reflect the new event handling structure.
- Adjusted YAML configurations and example implementations to align with the new event definitions.
- Enhanced the .gitignore file to include .DS_Store and ensure cleaner project management.

These changes improve the overall coherence of the codebase and enhance the clarity of event-driven functionality.
2025-09-30 20:10:16 +08:00