spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / hooks / context / environment-fields-of / action-ref-of / action-ref-of.ts
11 lines · 418 BRaw
1/**
2 * The row's `github_action_ref`: what follows `claude-code-action/` in the
3 * action's path, as the CLI reads it; undefined when the path names none.
4 *
5 * @param actionPath GITHUB_ACTION_PATH as read
6 * @returns the ref, or undefined
7 */
8export const actionRefOf = (actionPath: string | undefined) =>
9 actionPath?.includes('claude-code-action/')
10 ? actionPath.split('claude-code-action/')[1]
11 : undefined