MCPcopy Create free account
hub / github.com/github/gh-aw / getPromptPath

Function getPromptPath

actions/setup/js/messages_core.cjs:125–131  ·  view source on GitHub ↗

* Resolve the absolute path to a prompt template file. * Prefers GH_AW_PROMPTS_DIR when set, otherwise falls back to * ${RUNNER_TEMP}/gh-aw/prompts (the runtime location used in production). * Throws if neither GH_AW_PROMPTS_DIR nor RUNNER_TEMP is set. * @param {string} name - Template filename

(name)

Source from the content-addressed store, hash-verified

123 * @returns {string} Absolute path to the prompt template file
124 */
125function getPromptPath(name) {
126 const promptsDir = process.env.GH_AW_PROMPTS_DIR || (process.env.RUNNER_TEMP ? `${process.env.RUNNER_TEMP}/gh-aw/prompts` : null);
127 if (!promptsDir) {
128 throw new Error("Cannot resolve prompt path: neither GH_AW_PROMPTS_DIR nor RUNNER_TEMP is set");
129 }
130 return `${promptsDir}/${name}`;
131}
132
133/**
134 * Read a template file and render it with the given context.

Calls

no outgoing calls

Tested by

no test coverage detected