Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 3.31 KB

File metadata and controls

48 lines (35 loc) · 3.31 KB

Guidelines for Developing this GitHub Action

This project is a composite GitHub Action for Qwen Code integration, designed to be reusable, efficient, and secure for other developers.

Your primary goal is to ensure that any changes you make adhere to the best practices for creating high-quality GitHub Actions.

Core Principles for This Action

  1. Understand the action.yml Manifest:

    • This is the heart of the action. It defines inputs, outputs, branding, and the execution steps.
    • When adding or modifying functionality, ensure the action.yml is updated clearly and correctly.
    • Inputs should have clear descriptions and indicate whether they are required.
    • Key inputs for Qwen Code include: openai_api_key, openai_base_url, openai_model, and qwen_cli_version.
  2. Embrace Composability:

    • This is a composite action, meaning it runs a series of shell commands. This makes it lightweight and fast.
    • Prefer using standard, portable shell commands (sh) to ensure compatibility across different runners.
    • Avoid introducing complex dependencies that would require a containerized action unless absolutely necessary.
  3. Security is Paramount:

    • Never expose secrets. Set required tokens and keys (like QWEN_API_KEY) as environment variables using secrets in your workflows.
    • Principle of Least Privilege: When documenting required permissions for the action (in the README.md), always recommend the minimum set of permissions necessary for the action to function.
  4. Prioritize User Experience:

    • Clear Documentation: The README.md is our user manual. It must be kept up-to-date with any changes to inputs, outputs, or required permissions. Usage examples are critical.
    • Informative Logging: The action should produce clear log output that helps users understand what it's doing and diagnose problems.
    • Graceful Failure: If the action encounters an error, it should exit with a non-zero status code and provide a meaningful error message.
  5. Maintain Workflow Examples:

    • The files in the /examples directory are crucial for demonstrating how to use this action.
    • Ensure they are kept in sync with the latest features and best practices.
    • Examples include PR review, issue triage, and general assistant workflows.

Your Role in Development

When asked to modify the action, you should:

  1. Analyze the Request: Understand how the requested change impacts the action.yml, the shell scripts, and the documentation.
  2. Plan Your Changes: Propose a plan that includes modifications to all relevant files.
  3. Implement and Verify: Make the changes and ensure the action still functions as expected. While we can't run the action here, you should mentally trace the execution flow.
  4. Update Documentation: Ensure the README.md and any relevant examples are updated to reflect your changes.

Qwen Code Specific Considerations

  • Authentication: This action uses OpenAI-compatible API authentication with DashScope (Alibaba Cloud).
  • CLI Installation: The action installs the Qwen Code from npm (@qwen-code/qwen-code) or from GitHub.
  • Configuration: Settings are stored in .qwen/settings.json and commands in .qwen/commands/.
  • Interaction: Users mention @qwencoder in issues/PRs to trigger the action.