This workflow acts as a central dispatcher for Qwen Code, routing requests to the appropriate workflow based on the triggering event and the command provided in the comment.
This workflow is triggered by the following events:
- Pull request review comment (created)
- Pull request review (submitted)
- Pull request (opened)
- Issue (opened, reopened)
- Issue comment (created)
The workflow uses a dispatch job to determine which command to execute based on the following logic:
- If a comment contains
@qwencoder /review, it calls theqwen-review.ymlworkflow. - If a comment contains
@qwencoder /triage, it calls theqwen-triage.ymlworkflow. - If a comment contains
@qwencoder(without a specific command), it calls theqwen-invoke.ymlworkflow. - When a new pull request is opened, it calls the
qwen-review.ymlworkflow. - When a new issue is opened or reopened, it calls the
qwen-triage.ymlworkflow.
- qwen-review.yml: This workflow reviews a pull request.
- qwen-triage.yml: This workflow triages an issue.
- qwen-invoke.yml: This workflow is a general-purpose workflow that can be used to perform various tasks.
You can easily extend the dispatch workflow to include your own custom workflows. Here's how:
- Create your workflow file: Create a new YAML file in the
.github/workflowsdirectory with your custom workflow logic. Make sure your workflow is designed to be called byworkflow_call. - Define a new command: Decide on a new command to trigger your workflow, for example,
@qwencoder /my-command. - Update the
dispatchjob: Inqwen-dispatch.yml, add a new condition to theifstatement in thedispatchjob to recognize your new command. - Add a new job to call your workflow: Add a new job to
qwen-dispatch.ymlthat calls your custom workflow file.
To use this workflow, simply trigger one of the events listed above. For comment-based triggers, make sure the comment starts with @qwencoder and the appropriate command.