Skip to content

fix: Qwen Triage CI posts literal file path instead of comment content #4785

@yiliang114

Description

@yiliang114

Problem

When the Qwen Triage workflow runs in CI (triggered by pull_request_target: opened), the bot posts a comment with body @/tmp/stage-1.md — the literal file path instead of the file content. Labels are also incorrectly applied (e.g., welcome-pr on a test PR).

Example: #4784 (comment)

Root Cause

The workflow prompt passes a long text instruction telling the agent to "Run /triage 4784" and lists key rules. But qwen --yolo --prompt "$PROMPT" in --prompt mode does not trigger skill framework loading — the /triage in the prompt text is not intercepted as a slash command.

As a result, the agent reads the skill file manually and follows it imprecisely — specifically using --body @/tmp/stage-1.md (curl syntax) instead of --body-file /tmp/stage-1.md (correct gh CLI syntax). Locally this works because /triage typed in interactive mode triggers proper skill injection by the framework.

Additionally, pr-workflow.md contains a bug in the re-run section: gh api ... -f body=@/tmp/... (lowercase -f doesn't expand @file, should be capital -F). This reinforces the wrong @ pattern.

Fix

  1. Change the workflow prompt from a 15-line instruction to just /triage $NUMBER — the framework handles skill loading, matching local behavior
  2. Fix -f-F in pr-workflow.md re-run example
  3. Add notes in skill files clarifying --body-file vs --body @ semantics

Verification

After merging, test with:

gh workflow run "Qwen Triage" --ref main -f number=<pr-number>

Metadata

Metadata

Assignees

Labels

category/integrationExternal integrationspriority/P2Medium - Moderately impactful, noticeable problemscope/ci-cdContinuous integration/deploymentscope/github-actionsGitHub Actions integrationtype/bugSomething isn't working as expected

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions