| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: stop wrapping ErrSecretDetected as 'failed to read file' + add 401 guidance (#428, #432) #428: When a --body-file/--notes-file/--description-file contains the current token value, ReadTextFile/ReadTextFromFlag correctly return ErrSecretDetected, but callers wrapped it as 'failed to read file', misleading users into thinking it was an IO error. Now checks errors.Is(err, ErrSecretDetected) before wrapping. Affected paths: - cmdutil.ReadBody (covers issue/pr comment, comment edit, issue edit via getBody delegation from #427) - pr edit --body-file - milestone edit --description-file - release create --notes-file - release edit --notes-file #432: APIError.Error() now adds actionable guidance for 401, matching the existing 403 pattern: 'Your token may be invalid or expired. Try: - Run Tip: Authenticate with GitCode ? Paste your authentication token: to re-authenticate - Check that GC_TOKEN or GITCODE_TOKEN is set correctly' Refs #428 Refs #432 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 3 个月前 | |
fix(release/edit): move secret scan before GetRelease for fail-fast (round 2) Second-round UX review (F3): release edit --notes scan was after GetRelease API call, causing unnecessary network round-trip and masking scan rejection behind API failures. Moved scan before GetRelease to match the other 9 paths (fail-fast, no network). - release edit: scan opts.Notes before api.GetRelease call - test: updated to assert no API call reaches the mock - system test: added path 10 (release edit) to secret-scan.txtar (all 10 paths now covered) - docs/REGRESSION.md: updated from 9 to 10 paths Refs #424 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 3 个月前 |