mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
refactor: simplify error capture to show clean error messages only
- Remove complex shell script that captured full output logs - Use core.setOutput in prepare.ts to pass clean error message directly - Avoid exposing potentially sensitive information from logs - Show only the actual error message (e.g. 'Failed to fetch issue data') This provides cleaner, more readable error messages without the risk of exposing sensitive information from debug logs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -45,8 +45,7 @@ describe("updateCommentBody", () => {
|
||||
currentBody: "Claude Code is working...",
|
||||
actionFailed: true,
|
||||
executionDetails: { duration_ms: 45000 },
|
||||
errorDetails:
|
||||
"fatal: not a git repository (or any of the parent directories): .git",
|
||||
errorDetails: "Failed to fetch issue data",
|
||||
};
|
||||
|
||||
const result = updateCommentBody(input);
|
||||
@@ -54,7 +53,7 @@ describe("updateCommentBody", () => {
|
||||
expect(result).toContain("[View job]");
|
||||
expect(result).toContain("<details>");
|
||||
expect(result).toContain("<summary>Error details</summary>");
|
||||
expect(result).toContain("fatal: not a git repository");
|
||||
expect(result).toContain("Failed to fetch issue data");
|
||||
// Ensure error details come after the header/links
|
||||
const errorIndex = result.indexOf("<details>");
|
||||
const headerIndex = result.indexOf("**Claude encountered an error");
|
||||
|
||||
Reference in New Issue
Block a user