Skip to content

Commit fd13dc5

Browse files
committed
Refactor Claude Code Action by removing unnecessary timeout and custom instructions handling, streamlining command argument preparation for improved clarity and efficiency.
1 parent 022e6fe commit fd13dc5

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

.github/actions/claude-code-action/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,6 @@ runs:
211211
# Build command arguments
212212
CMD_ARGS=("-p" "--verbose" "--output-format" "stream-json")
213213
214-
# Add timeout if specified
215-
if [[ -n "${{ inputs.timeout_minutes }}" ]]; then
216-
CMD_ARGS+=("--timeout" "${{ inputs.timeout_minutes }}m")
217-
fi
218-
219214
# Add max turns if specified
220215
if [[ -n "${{ inputs.max_turns }}" ]]; then
221216
CMD_ARGS+=("--max-turns" "${{ inputs.max_turns }}")
@@ -233,17 +228,12 @@ runs:
233228
CMD_ARGS+=("--disallowedTools" "${{ inputs.disallowed_tools }}")
234229
fi
235230
236-
# Add custom instructions
237-
if [[ -n "${{ inputs.custom_instructions }}" ]]; then
238-
CMD_ARGS+=("--custom-instructions" "${{ inputs.custom_instructions }}")
239-
fi
240-
241231
# Read the prompt content
242232
PROMPT_CONTENT=$(cat "${{ env.PROMPT_FILE }}")
243233
244234
echo "📝 Executing: claude ${CMD_ARGS[*]} \"[prompt content]\""
245235
246-
# Execute Claude Code with timeout
236+
# Execute Claude Code with timeout using the timeout command
247237
TIMEOUT_SECONDS=$((${{ inputs.timeout_minutes }} * 60))
248238
timeout $TIMEOUT_SECONDS claude "${CMD_ARGS[@]}" "$PROMPT_CONTENT"
249239

0 commit comments

Comments
 (0)