From 257e62596fcade94d624be5cadc7dc5bf6fb16bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:07:24 +0000 Subject: [PATCH 1/2] Initial plan From 1aca41ffc18d35a2da27cd6710b35d10ab015edb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:19:22 +0000 Subject: [PATCH 2/2] feat(docs): add PromptCode component and issue-triage prompt - Add docs/src/components/PromptCode.astro: reads a markdown prompt file at build time and renders it in a code block prepended with "Create an agentic workflow using the address " - Add docs/src/prompts/issue-triage.md: issue-triage workflow prompt body - Update creating-workflows.mdx: replace hard-coded first code block with component using the issue-triage prompt Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- docs/src/components/PromptCode.astro | 24 +++++++++++++++++++ .../content/docs/setup/creating-workflows.mdx | 10 ++++---- docs/src/prompts/issue-triage.md | 7 ++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 docs/src/components/PromptCode.astro create mode 100644 docs/src/prompts/issue-triage.md diff --git a/docs/src/components/PromptCode.astro b/docs/src/components/PromptCode.astro new file mode 100644 index 00000000000..a1daa783666 --- /dev/null +++ b/docs/src/components/PromptCode.astro @@ -0,0 +1,24 @@ +--- +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import { Code } from '@astrojs/starlight/components'; + +interface Props { + /** Path to the prompt markdown file, relative to `docs/src/`. */ + src: string; + /** URL that will be embedded in the first sentence of the prompt. */ + address: string; + /** Optional title shown as a header above the code block. */ + title?: string; +} + +const { src, address, title } = Astro.props; + +// process.cwd() is the docs project root during `astro build` / `astro dev` +const filePath = resolve(process.cwd(), 'src', src); +const fileContent = readFileSync(filePath, 'utf-8').trim(); + +const code = `Create an agentic workflow using the address ${address}\n\n${fileContent}`; +--- + + diff --git a/docs/src/content/docs/setup/creating-workflows.mdx b/docs/src/content/docs/setup/creating-workflows.mdx index 39560e02cb3..57942173bca 100644 --- a/docs/src/content/docs/setup/creating-workflows.mdx +++ b/docs/src/content/docs/setup/creating-workflows.mdx @@ -6,6 +6,7 @@ sidebar: --- import CopyEntireFileButton from '../../../components/CopyEntireFileButton.astro'; +import PromptCode from '../../../components/PromptCode.astro'; import Video from '../../../components/Video.astro'; **⏱️ Estimated time: 5-15 minutes** depending on complexity @@ -24,11 +25,10 @@ For a more fine grained, interactive experience we recommend using a coding agen Use this Agent Session task in your repository. -```markdown wrap -Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md - -The purpose of the workflow is triage issues. -``` +