[product-manager-impersonator] Render alternate workflow examples in docs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- documentation
Research direction
Start in docs/hooks.py, especially _generate_page and the lines that read README.md and example.yml and append the example section. Review the existing _generate_page coverage in tests/test_docs_hooks.py, then run that test while checking a temporary workflow containing example.yml and example-chained.yml. Done means both workflow snippets and their sections appear on the generated page.
Written by the indexing model from the issue text.
Description
Feature Idea
Summary: Update the generated workflow docs so pages automatically include alternate example files such as example-chained.yml when a workflow ships them, instead of showing only the detector-only example.yml.
Why a Customer Would Want This
Maintainers evaluating scheduled detectors often want the fully autonomous detector-to-fixer path, but the generated workflow pages currently embed only the default example. When a workflow already ships a chained example, users should be able to copy it directly from the docs page without jumping back to the repository tree or piecing the pattern together from separate chaining docs.
Rough Implementation Sketch
- Extend
docs/hooks.pyto discover optional example variants next toexample.yml(starting withexample-chained.yml). - Render additional sections such as
## Chained Example Workflowafter the existing## Example Workflowblock. - Add a focused
tests/test_docs_hooks.pycase that creates a temporary workflow directory with bothexample.ymlandexample-chained.ymland asserts both snippets are present. - Keep the first iteration narrow to already-existing files; no new workflow templates are required.
Why It Won't Be That Hard
The docs generator already centralizes workflow page creation in one helper: docs/hooks.py reads README.md and example.yml in _generate_page and appends a single YAML block. Adding optional sibling example rendering is a small extension to that helper plus one existing test module.
Evidence
docs/hooks.py:81-84reads onlyREADME.mdandexample.ymlfor each generated workflow page.docs/hooks.py:114appends a single## Example WorkflowYAML block.- Existing tests already cover
_generate_pagebehavior intests/test_docs_hooks.py:22-60, so there is a natural place for coverage. - The repository already ships chained examples for five detector workflows:
gh-agent-workflows/bug-hunter/example-chained.yml,gh-agent-workflows/code-complexity-detector/example-chained.yml,gh-agent-workflows/code-duplication-detector/example-chained.yml,gh-agent-workflows/newbie-contributor-patrol/example-chained.yml, andgh-agent-workflows/test-coverage-detector/example-chained.yml. docs/workflows/gh-agent-workflows/bugs.md:19-27already advertises a chained install path, but the generator still only embedsexample.ymlon generated pages.
Duplicate check: this is distinct from #1441 (new comment-only chained templates), #887 (permissions in chaining quick-start), #1201 (homepage Bug Hunter setup path), and #849 (Text Auditor chained setup visibility). This proposal is the small reusable docs-generator feature that surfaces alternate examples that already exist.
What is this? | From workflow: Trigger Product Manager Impersonator
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 11h 16m
- Merged PRs (30d)
- 29
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/ai-github-actions
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
elastic/ai-github-actions#2142 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
elastic/ai-github-actions#2132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
elastic/ai-github-actions#2127 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elastic/ai-github-actions#2126 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
elastic/ai-github-actions#2121 ·
All issues in elastic/ai-github-actions
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100