-
[NA] [CI] fix(workflow): gate pr-auto-assign success echo behind successful gh pr edit (#6781)
发布于
2026-05-24 04:24:35 +00:00 - [NA] [CI] fix(workflow): gate pr-auto-assign success echo behind successful gh pr edit
The previous version always logged 'Successfully assigned' even when
gh pr edit failed, masking failures in workflow logs. Move the success
echo into the true branch of an if/then/else so the success message
only appears on actual success; the failure path keeps the existing
'❌ Failed...' log without exiting non-zero, preserving the tolerant
behavior for external-collaborator PRs.Mirrors the same fix applied in comet-ml/ollie-assist#283 after a
baz-reviewer[bot] code-review flag.- fix(workflow): verify assignment via gh pr view after gh pr edit
GitHub can silently ignore '--add-assignee' for users without push access
while still exiting 0, so gh pr edit's exit code alone is not a reliable
success signal. Re-read the PR's assignees with 'gh pr view ... --json
assignees' after the edit and confirm the requested user actually landed
before logging 'Successfully assigned'. If the user isn't in the post-edit
assignees list, log a warning explaining the silent-ignore case. Failure
of gh pr edit itself keeps the existing tolerant error log.Addresses review comment on PR #6781.
下载附件