elastic / elastic/ai-github-actions

[product-manager-impersonator] Repository variable pause for scheduled runs

Open
#1,506 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 optional repository-variable pause guard to scheduled workflow examples so teams can temporarily stop scheduled AI runs without disabling manual `workflow_dispatch` runs.

## Why a Customer Would Want This
Teams that install the continuous-improvement bundle can end up running many weekday scheduled agents. During release freezes, incident response, budget reviews, or noisy periods, repository operators need a fast way to pause scheduled automation across a repo without editing every workflow file or disabling the workflows entirely. A shared repository variable keeps manual runs available while giving maintainers an obvious emergency brake.

## Rough Implementation Sketch
- Add a consistent job-level guard to scheduled trigger examples, for example `if: github.event_name != 'schedule' || vars.GH_AW_SCHEDULED_PAUSED != 'true'` on the `run` job.
- Apply it to scheduled `gh-agent-workflows/*/example.yml` templates, especially continuous-improvement workflows installed by quick setup.
- Document the variable in `gh-agent-workflows/README.md` and relevant workflow docs so maintainers know that setting `GH_AW_SCHEDULED_PAUSED=true` pauses scheduled runs but leaves `workflow_dispatch` usable.

## Why It Won't Be That Hard
This is a small template/documentation change: the workflows already centralize consumer-facing trigger YAML under `gh-agent-workflows//example.yml`, and GitHub Actions exposes repository variables through the existing `vars` context. No compiled workflow behavior or safe-output schema needs to change.

## Evidence
- `scripts/quick-setup.sh:122-136` installs a large continuous-improvement set, including `bug-hunter`, `code-complexity-detector`, `docs-patrol`, `product-manager-impersonator`, `stale-issues-investigator`, and other scheduled workflows.
- `gh-agent-workflows/product-manager-impersonator/example.yml:2-5` defines a weekday `schedule` plus `workflow_dispatch`, but `gh-agent-workflows/product-manager-impersonator/example.yml:14-16` runs the job unconditionally.
- `gh-agent-workflows/code-complexity-detector/example.yml:2-5` has the same scheduled/manual trigger pattern, with an unconditional job at `gh-agent-workflows/code-complexity-detector/example.yml:14-18`.
- `gh-agent-workflows/docs-patrol/example.yml:2-5` also schedules weekday runs and has no pause guard on `gh-agent-workflows/docs-patrol/example.yml:14-16`.
- Local search found no existing `GH_AW_SCHEDULED_PAUSED` or equivalent pause guard in the repository, and duplicate review found related scheduled-run ideas but none covering a repository-level scheduled pause switch.

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

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

Contributor guide

Open the contributing guide

Research direction

Start with gh-agent-workflows/product-manager-impersonator/example.yml, then compare the scheduled/manual patterns in code-complexity-detector/example.yml and docs-patrol/example.yml. Review scripts/quick-setup.sh:122-136 and gh-agent-workflows/README.md plus relevant workflow documentation. Done means the applicable scheduled examples honor GH_AW_SCHEDULED_PAUSED=true while workflow_dispatch remains available, and the variable is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.