From 9cf75f75b9d954f16b5fd70f7bd58ebcbc667e6a Mon Sep 17 00:00:00 2001 From: Yuku Kotani Date: Thu, 24 Jul 2025 14:16:10 +0900 Subject: [PATCH] feat: format PR and issue body text in prompt variables (#330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: format PR and issue body text in prompt variables Apply formatBody function to PR_BODY and ISSUE_BODY variables to properly handle images and markdown formatting in prompt context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * style: format PR_BODY and ISSUE_BODY ternary expressions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * feat: add claude_code_oauth_token to all GitHub workflow tests Add claude_code_oauth_token parameter to all test workflow files to support new authentication method. This ensures proper authentication for Claude Code API access in GitHub Actions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * Revert "feat: add claude_code_oauth_token to all GitHub workflow tests" This reverts commit fccc1a0ebd683fadef2730f2876b445a24a1e4e0. --------- Co-authored-by: Claude --- src/create-prompt/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/create-prompt/index.ts b/src/create-prompt/index.ts index 0da43748..f9ff35dc 100644 --- a/src/create-prompt/index.ts +++ b/src/create-prompt/index.ts @@ -481,8 +481,14 @@ function substitutePromptVariables( : "", PR_TITLE: eventData.isPR && contextData?.title ? contextData.title : "", ISSUE_TITLE: !eventData.isPR && contextData?.title ? contextData.title : "", - PR_BODY: eventData.isPR && contextData?.body ? contextData.body : "", - ISSUE_BODY: !eventData.isPR && contextData?.body ? contextData.body : "", + PR_BODY: + eventData.isPR && contextData?.body + ? formatBody(contextData.body, githubData.imageUrlMap) + : "", + ISSUE_BODY: + !eventData.isPR && contextData?.body + ? formatBody(contextData.body, githubData.imageUrlMap) + : "", PR_COMMENTS: eventData.isPR ? formatComments(comments, githubData.imageUrlMap) : "",