elastic / elastic/ai-github-actions

[product-manager-impersonator] Quick setup auto-stash mode for dirty working trees

Open
#1,262 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Feature Idea

**Summary:** Add an opt-in `--auto-stash` flag to `scripts/quick-setup.sh` so setup can proceed when the repository has local uncommitted changes.

## Why a Customer Would Want This
Teams often try quick setup while actively working in a repo. Today setup hard-fails on any dirty working tree, which interrupts onboarding and adds manual stash/commit steps before users can even try the workflows.

## Rough Implementation Sketch
- Add `--auto-stash` to `scripts/quick-setup.sh` argument parsing and help text.
- Keep current behavior as default; only stash when the flag is explicitly set.
- On dirty tree + `--auto-stash`, run a labeled stash (including untracked files), continue setup, and print explicit restore instructions at the end.
- Document the new flag in quick-setup docs (`README.md` and `gh-agent-workflows/README.md`).

## Why It Won't Be That Hard
The script already has a single, centralized dirty-tree gate and a linear setup flow. This feature is an additive branch around existing logic in one script plus small docs updates, with no new services or architecture changes.

## Evidence
- `scripts/quick-setup.sh:90-93` currently exits immediately on any uncommitted changes.
- `scripts/quick-setup.sh:23-30` lists supported flags; there is no dirty-tree override path.
- `scripts/quick-setup.sh:177-182` always checks out/creates the setup branch, so users currently must clean/stash manually first.
- `README.md:28-39` presents quick setup as a single command onboarding path.
- `gh-agent-workflows/README.md:44-65` documents quick setup options but no way to proceed from a dirty tree.
- Recent feature ideas and open issues include many quick-setup improvements, but none covering auto-stash for uncommitted changes (checked issue search and previous findings list).

> [!NOTE]
>
> 🔒 Integrity filter blocked 37 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#1175](https://github.com/elastic/ai-github-actions/pull/1175) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#359](https://github.com/elastic/ai-github-actions/issues/359) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1067](https://github.com/elastic/ai-github-actions/issues/1067) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#704](https://github.com/elastic/ai-github-actions/issues/704) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#694](https://github.com/elastic/ai-github-actions/issues/694) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#684](https://github.com/elastic/ai-github-actions/issues/684) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#875](https://github.com/elastic/ai-github-actions/issues/875) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#676](https://github.com/elastic/ai-github-actions/issues/676) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#505](https://github.com/elastic/ai-github-actions/issues/505) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#476](https://github.com/elastic/ai-github-actions/issues/476) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#1067 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#1025 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1175](https://github.com/elastic/ai-github-actions/pull/1175) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1128](https://github.com/elastic/ai-github-actions/pull/1128) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#547](https://github.com/elastic/ai-github-actions/issues/547) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49](https://github.com/elastic/ai-github-actions/issues/49) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 21 more items
>
> To allow these resources, lower `min-integrity` in your GitHub frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/27412232003)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.