elastic / elastic/ai-github-actions
[product-manager-impersonator] Quick setup trigger YAML preview
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add a `--preview-files` mode (or `--dry-run --verbose`) to `scripts/quick-setup.sh` so adopters can see the exact trigger YAML that would be installed before creating a branch or PR.
## Why a Customer Would Want This
Teams installing AI GitHub Actions often start with the documented `curl | bash` quick setup path, but they still need to review which events, permissions, schedules, and workflow calls will land in their repository. Today `--dry-run` only prints the shell actions it would take, so security-conscious maintainers must manually open each `gh-agent-workflows//example.yml` file or run the script for real and inspect the branch afterward.
A file-preview mode would make the first install feel safer: customers can copy the quick setup command, add the preview flag, review the generated `.github/workflows/trigger-*.yml` contents in one terminal output, and then rerun without the preview flag when they are comfortable.
## Rough Implementation Sketch
- Add a `--preview-files` flag to `scripts/quick-setup.sh`, documented alongside `--dry-run`.
- When previewing, resolve the same workflow list and target paths already used by setup, fetch each selected `example.yml`, and print it under a clear header such as `--- .github/workflows/trigger-pr-review.yml ---`.
- Keep the existing `--dry-run` behavior for action summaries; combine it with `--preview-files` so preview mode never creates branches, commits, pushes, or PRs.
- Update the quick setup sections in `README.md` and `gh-agent-workflows/README.md` with a short example command.
## Why It Won't Be That Hard
The script already computes the selected workflow IDs, source URLs, and destination paths in one loop. The new mode can reuse that flow and swap the `curl -fsSL "$src" -o "$dest"` write with `curl -fsSL "$src"` plus a target-file header. No reusable workflow internals or generated lock files need to change.
## Evidence
- `README.md:28-40` promotes the quick setup script as the main installation path and notes it creates a branch, pushes, and opens a PR.
- `scripts/quick-setup.sh:21-28` documents `--dry-run` only as "Print actions without making changes."
- `scripts/quick-setup.sh:188-197` already maps each selected workflow to `gh-agent-workflows/$workflow/example.yml` and `.github/workflows/trigger-$workflow.yml`.
- `scripts/quick-setup.sh:209-214` currently prints dry-run commands, but not the generated trigger contents a customer would review.
Duplicate check: this is distinct from existing Product Manager Impersonator requests for a workflow chooser, permission preflight, postflight verifier, existing-file safety mode, shared defaults file, maintainer handoff guide, local-only mode, workflow ID validation, named presets, and the closed `--audit` preflight idea.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/28233796498)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Research direction
Start with scripts/quick-setup.sh:21-28 for option handling, then inspect the workflow mapping at 188-197 and dry-run output at 209-214. Compare the existing quick-setup guidance in README.md:28-40 and gh-agent-workflows/README.md. Done means the preview prints each selected trigger YAML with its destination header, while preview and dry-run avoid branches, commits, pushes, and PRs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, github-actions
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100