Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/src/components/PromptCode.astro
Original file line number Diff line number Diff line change
@@ -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}`;
---

<Code code={code} lang="text" wrap title={title} />
10 changes: 5 additions & 5 deletions docs/src/content/docs/setup/creating-workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
```
<PromptCode
src="prompts/issue-triage.md"
address="https://raw.githubusercontent.com/github/gh-aw/main/create.md"
/>

<Video
src="/gh-aw/videos/create-workflow-on-github.mp4"
Expand Down
7 changes: 7 additions & 0 deletions docs/src/prompts/issue-triage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The purpose of the workflow is to triage new GitHub issues.

When a new issue is opened the workflow should:
- Analyze the issue content and classify it as a bug, feature request, question, or documentation improvement
- Apply one or more appropriate labels based on the classification
- Post a triage comment that explains the classification and recommends the next steps for the issue author and maintainers
- Assign the issue to a relevant team member when the content clearly maps to a known area of ownership