ci(autofix): include review-address failures in feedback

This commit is contained in:
yiliang114 2026-07-09 03:49:00 +08:00
parent 7c1541f803
commit e7f47be155
2 changed files with 6 additions and 2 deletions

View file

@ -1247,7 +1247,7 @@ jobs:
| select(((.author_association // "") | IN($trust[])) or (.user.login // "") == $rb)
| select((.body // "") | test("<!-- (autofix-eval|qwen-triage|qwen-review-suggestion-summary|pr-force-push|qwen-review-ack) ") | not) | .created_at))
+ (.[3] | map(select((.conclusion // .state // "") | IN("FAILURE", "FAILED", "ERROR", "TIMED_OUT", "ACTION_REQUIRED", "CANCELLED"))
| select((.workflowName // "") != "Qwen Autofix")
| select(((.workflowName // "") != "Qwen Autofix") or (((.name // "") | startswith("review-address"))))
| select((.completedAt // .updatedAt // "") > $wm)
| (.completedAt // .updatedAt // "")))
| max // ""' "${WORKDIR}/rv.json" "${WORKDIR}/rc.json" "${WORKDIR}/ic.json" "${WORKDIR}/checks.json")"
@ -1299,7 +1299,7 @@ jobs:
jq -r --arg wm "${WATERMARK}" '
.[]
| select((.conclusion // .state // "") | IN("FAILURE", "FAILED", "ERROR", "TIMED_OUT", "ACTION_REQUIRED", "CANCELLED"))
| select((.workflowName // "") != "Qwen Autofix")
| select(((.workflowName // "") != "Qwen Autofix") or (((.name // "") | startswith("review-address"))))
| select((.completedAt // .updatedAt // "") > $wm)
| "- \((.workflowName // "external check") | gsub("[^A-Za-z0-9 _./()-]"; "") | .[0:80]): \(.conclusion // .state // "?")"' \
"${WORKDIR}/checks.json"

View file

@ -421,6 +421,10 @@ describe('qwen-autofix workflow', () => {
expect(workflow).toContain(
'.[3] | map(select((.conclusion // .state // "")',
);
expect(
prepareBranchAndFeedbackStep.match(/startswith\("review-address"\)/g) ??
[],
).toHaveLength(2);
expect(prepareBranchAndFeedbackStep).toContain(
'gsub("[^A-Za-z0-9 _./()-]"; "") | .[0:80]',
);