Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/qwen-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,29 @@ permissions:
contents: 'read'
issues: 'write'
pull-requests: 'write'
actions: 'write'

jobs:
triage:
timeout-minutes: 10
timeout-minutes: 30
concurrency:
group: '${{ github.workflow }}-${{ github.event_name }}-${{ github.event.issue.number || github.event.pull_request.number || github.event.inputs.number }}'
cancel-in-progress: true
cancel-in-progress: >-
${{
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
github.event_name != 'issue_comment' ||
(startsWith(github.event.comment.body, '@qwen-code /triage') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'))
}}
runs-on: 'ubuntu-latest'
# startsWith (not contains) prevents false triggers from comments that
# mention the phrase in quoted text or mid-sentence descriptions.
if: >-
github.repository == 'QwenLM/qwen-code' && (
github.event_name == 'issues' ||
github.event_name == 'pull_request_target' ||
(github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name == github.repository &&
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
github.event.pull_request.draft == false) ||
github.event_name == 'workflow_dispatch' ||
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
(github.event_name == 'issue_comment' &&
startsWith(github.event.comment.body, '@qwen-code /triage') &&
Expand Down Expand Up @@ -69,7 +77,6 @@ jobs:
OPENAI_MODEL: '${{ vars.QWEN_PR_REVIEW_MODEL }}'
settings_json: |-
{
"maxSessionTurns": 25,
"coreTools": [
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
"run_shell_command",
"write_file",
Expand Down
9 changes: 7 additions & 2 deletions .qwen/skills/triage/references/pr-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ COMMENT_ID=$(gh api "repos/$REPO/issues/$PR_NUMBER/comments" -F body=@/tmp/stage
| Stage 2 | Code review + test results (with screenshots) |
| Stage 3 | Reflection + verdict |

**Terminal gate exception:** if Stage 1a template check fails, submit exactly
one `CHANGES_REQUESTED` review and stop. Do not also post or update a Stage 1
issue comment, and do not continue to Stage 2, Stage 3, or approval.

**Re-runs:** if the triage runs again on the same PR, update each comment in place:

```bash
Expand Down Expand Up @@ -49,7 +53,7 @@ This is the most important stage — catch problems before anyone spends time re

**1a. Template check:**

PR body missing required headings from `.github/pull_request_template.md` (read from worktree) → request changes, @mention author, link the template, stop.
PR body missing required headings from `.github/pull_request_template.md` (read from worktree) → request changes, @mention author, link the template, stop. This is the only public output for this terminal gate.

```bash
gh pr review "$PR_NUMBER" --repo "$REPO" --request-changes --body-file /tmp/pr-gate-template.md
Expand Down Expand Up @@ -119,7 +123,8 @@ On approach: <state your honest assessment — the scope feels right / feels lik
— _Qwen Code · qwen3.7-max_
```

Save this comment's ID. If template fails or direction is escalated → stop here.
Save this comment's ID. If direction is escalated → stop here. Template
failures already stopped in Stage 1a.

### Stage 2: Review + Test

Expand Down
Loading