mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
feat: format PR and issue body text in prompt variables (#330)
* 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 <noreply@anthropic.com>
* style: format PR_BODY and ISSUE_BODY ternary expressions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* Revert "feat: add claude_code_oauth_token to all GitHub workflow tests"
This reverts commit fccc1a0ebd.
---------
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -481,8 +481,14 @@ function substitutePromptVariables(
|
|||||||
: "",
|
: "",
|
||||||
PR_TITLE: eventData.isPR && contextData?.title ? contextData.title : "",
|
PR_TITLE: eventData.isPR && contextData?.title ? contextData.title : "",
|
||||||
ISSUE_TITLE: !eventData.isPR && contextData?.title ? contextData.title : "",
|
ISSUE_TITLE: !eventData.isPR && contextData?.title ? contextData.title : "",
|
||||||
PR_BODY: eventData.isPR && contextData?.body ? contextData.body : "",
|
PR_BODY:
|
||||||
ISSUE_BODY: !eventData.isPR && contextData?.body ? contextData.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
|
PR_COMMENTS: eventData.isPR
|
||||||
? formatComments(comments, githubData.imageUrlMap)
|
? formatComments(comments, githubData.imageUrlMap)
|
||||||
: "",
|
: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user