QwenLM/qwen-code-action
Shell
Captured source
source ↗QwenLM/qwen-code-action
Description: A GitHub Action that integrates Qwen Code into your development workflow.
Language: Shell
License: Apache-2.0
Stars: 29
Forks: 8
Open issues: 3
Created: 2025-08-03T07:51:20Z
Pushed: 2026-01-05T05:53:00Z
Default branch: main
Fork: no
Archived: no
README:
qwen-code-action
Overview
qwen-code-action is a GitHub Action that integrates [Qwen Code] into your development workflow. It acts both as an autonomous agent for critical routine coding tasks, and an on-demand collaborator you can quickly delegate work to.
Use it to perform GitHub pull request reviews, triage issues, perform code analysis and modification, and more using [Qwen Code] conversationally (e.g., @qwencoder fix this issue) directly inside your GitHub repositories.
- [qwen-code-action](#qwen-code-action)
- [Overview](#overview)
- [Features](#features)
- [Quick Start](#quick-start)
- [1. Get a Qwen API Key](#1-get-a-qwen-api-key)
- [2. Add it as a GitHub Secret](#2-add-it-as-a-github-secret)
- [3. Update your .gitignore](#3-update-your-gitignore)
- [4. Choose a Workflow](#4-choose-a-workflow)
- [5. Try it out](#5-try-it-out)
- [Workflows](#workflows)
- [Qwen Code Dispatch](#qwen-code-dispatch)
- [Issue Triage](#issue-triage)
- [Pull Request Review](#pull-request-review)
- [Qwen Code Assistant](#qwen-code-assistant)
- [Configuration](#configuration)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Repository Variables](#repository-variables)
- [Secrets](#secrets)
- [Authentication](#authentication)
- [GitHub Authentication](#github-authentication)
- [Extensions](#extensions)
- [Best Practices](#best-practices)
- [Customization](#customization)
- [Contributing](#contributing)
Features
- Automation: Trigger workflows based on events (e.g. issue opening) or schedules (e.g. nightly).
- On-demand Collaboration: Trigger workflows in issue and pull request
comments by mentioning the [Qwen Code] (e.g., @qwencoder /review).
- Extensible with Tools: Leverage [Qwen Code] models' tool-calling capabilities to
interact with other CLIs like the [GitHub CLI] (gh).
- Customizable: Use a
QWEN.mdfile in your repository to provide
project-specific instructions and context to [Qwen Code].
Quick Start
Get started with Qwen Code in your repository in just a few minutes:
1. Get a Qwen API Key
Obtain your API key from [DashScope] (Alibaba Cloud's AI platform)
2. Add it as a GitHub Secret
Store your API key as a secret named QWEN_API_KEY in your repository:
- Go to your repository's Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
QWEN_API_KEY, Value: your API key
3. Update your .gitignore
Add the following entries to your .gitignore file:
# qwen-code settings .qwen/ # GitHub App credentials gha-creds-*.json
4. Choose a Workflow
You have two options to set up a workflow:
Option A: Use setup command (Recommended)
1. Start the Qwen Code in your terminal:
qwen
2. In Qwen Code in your terminal, type:
/setup-github
Option B: Manually copy workflows
1. Copy the pre-built workflows from the [examples/workflows](./examples/workflows) directory to your repository's .github/workflows directory. Note: the qwen-dispatch.yml workflow must also be copied, which triggers the workflows to run.
5. Try it out
Pull Request Review:
- Open a pull request in your repository and wait for automatic review
- Comment
@qwencoder /reviewon an existing pull request to manually trigger a review
Issue Triage:
- Open an issue and wait for automatic triage
- Comment
@qwencoder /triageon existing issues to manually trigger triaging
General AI Assistance:
- In any issue or pull request, mention
@qwencoderfollowed by your request - Examples:
@qwencoder explain this code change@qwencoder suggest improvements for this function@qwencoder help me debug this error@qwencoder write unit tests for this component
Workflows
This action provides several pre-built workflows for different use cases. Each workflow is designed to be copied into your repository's .github/workflows directory and customized as needed.
Qwen Code Dispatch
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. For a detailed guide on how to set up the dispatch workflow, go to the [Qwen Code Dispatch workflow documentation](./examples/workflows/qwen-dispatch).
Issue Triage
This action can be used to triage GitHub Issues automatically or on a schedule. For a detailed guide on how to set up the issue triage system, go to the [GitHub Issue Triage workflow documentation](./examples/workflows/issue-triage).
Pull Request Review
This action can be used to automatically review pull requests when they are opened. For a detailed guide on how to set up the pull request review system, go to the [GitHub PR Review workflow documentation](./examples/workflows/pr-review).
Qwen Code Assistant
This type of action can be used to invoke a general-purpose, conversational Qwen Code AI assistant within the pull requests and issues to perform a wide range of tasks. For a detailed guide on how to set up the general-purpose Qwen Code workflow, go to the [Qwen Code Assistant workflow documentation](./examples/workflows/qwen-assistant).
Configuration
Inputs
- qwen_api_key: _(Optional)_ The API key for the Qwen API.
- qwen_version: _(Optional, default:
latest)_ The version of the Qwen Code to install. Can be "latest", "preview", "nightly", a specific version number, or a git branch, tag, or commit. For more information, see Qwen Code releases.
- qwen_debug: _(Optional)_ Enable debug logging and output streaming.
- qwen_model: _(Optional)_ The model to use with Qwen Code.
- prompt: _(Optional, default:
You are a helpful assistant.)_ A string passed to the Qwen Code's `--prompt` argument.
- settings: _(Optional)_ A JSON string written to
.qwen/settings.jsonto configure the CLI's _project_ settings.
For more details, see the documentation on settings files.
- use_qwen_code_assist: _(Optional, default:…
Excerpt shown — open the source for the full document.
Notability
notability 4.0/10New repo with low stars, routine