Skip to content

Make close-older-issues configurable for scheduled report workflows#355

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/configurable-close-option
Closed

Make close-older-issues configurable for scheduled report workflows#355
Copilot wants to merge 2 commits intomainfrom
copilot/configurable-close-option

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

This change makes scheduled report workflows configurable for whether older reports are auto-closed.

Why

Issue #354 requested making close-older-issues configurable instead of always closing older reports.

What changed

  • Added a close-older-issues workflow input (default: true) to all scheduled report workflow source definitions (.github/workflows/gh-aw-*.md).
  • Kept safe-outputs config in source files on literal booleans so gh-aw compilation remains valid.
  • Added scripts/inject-configurable-close.sh to post-process compiled lock workflows and replace hardcoded "close_older_issues":true with $\{\{ inputs.close-older-issues }} where supported.
  • Updated Makefile compile target to run the injection script after compilation/backwards-compat processing.
  • Regenerated lock workflows to include the new input and runtime-configured close_older_issues value.
  • Updated workflow README input tables in gh-agent-workflows/*/README.md to document close-older-issues.

Implementation detail

gh-aw rejects expressions in boolean safe-outputs YAML fields during compile, so this uses a post-compilation substitution in lock files. GitHub Actions evaluates $\{\{ inputs.close-older-issues }} at runtime, producing a valid JSON boolean for the safe-outputs handler.

Usage

jobs:
  run:
    uses: elastic/ai-github-actions/.github/workflows/gh-aw-project-summary.lock.yml@v0
    with:
      close-older-issues: false
    secrets:
      COPILOT_GITHUB_TOKEN: $\{\{ secrets.COPILOT_GITHUB_TOKEN }}

Default remains true, so existing callers keep current behavior.

Generated by Update PR Body

…kflows

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot AI changed the title [WIP] Make close older issue option configurable for scheduled reports Make close-older-issues configurable for scheduled report workflows Feb 21, 2026
Copilot AI requested a review from strawgate February 21, 2026 21:51
@strawgate strawgate marked this pull request as ready for review February 22, 2026 00:46
@strawgate strawgate closed this Feb 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces a configurable close-older-issues input across 17 GitHub Actions workflows to enable optional closing of older issues with matching title prefixes. Each workflow gains a new boolean input (default: true), expanded outputs for sanitized text computation, and dynamic reference injection via a new helper script.

Changes

Cohort / File(s) Summary
Workflow Configuration Updates (.lock.yml)
github/workflows/gh-aw-agent-suggestions.lock.yml, gh-aw-breaking-change-detect.lock.yml, gh-aw-breaking-change-detector.lock.yml, gh-aw-bug-hunter.lock.yml, gh-aw-code-duplication-detector.lock.yml, gh-aw-docs-drift.lock.yml, gh-aw-docs-patrol-external.lock.yml, gh-aw-docs-patrol.lock.yml, gh-aw-downstream-health.lock.yml, gh-aw-flaky-test-investigator.lock.yml, gh-aw-newbie-contributor-patrol-external.lock.yml, gh-aw-newbie-contributor-patrol.lock.yml, gh-aw-performance-profiler.lock.yml, gh-aw-project-summary.lock.yml, gh-aw-scheduled-audit.lock.yml, gh-aw-stale-issues.lock.yml, gh-aw-text-auditor.lock.yml
Added close-older-issues input to workflow_call, new activation job outputs (body, text, title) from sanitized step, dynamic reference to inputs.close-older-issues in Safe Outputs handler, and removed concurrency blocks from agent/detection jobs.
Workflow Documentation (.md)
github/workflows/gh-aw-agent-suggestions.md, gh-aw-breaking-change-detector.md, gh-aw-bug-hunter.md, gh-aw-code-duplication-detector.md, gh-aw-docs-patrol-external.md, gh-aw-docs-patrol.md, gh-aw-downstream-health.md, gh-aw-flaky-test-investigator.md, gh-aw-newbie-contributor-patrol-external.md, gh-aw-newbie-contributor-patrol.md, gh-aw-performance-profiler.md, gh-aw-project-summary.md, gh-aw-scheduled-audit.md, gh-aw-stale-issues.md, gh-aw-text-auditor.md
Documented new close-older-issues input (boolean, default true) in workflow_call inputs.
Workflow Documentation & Maintenance
github/workflows/agentics-maintenance.yml, gh-agent-workflows/*/README.md (17 files), Makefile, scripts/inject-configurable-close.sh
Updated workflow name from "Internal: Agentic Maintenance" to "Agentic Maintenance"; added close-older-issues input documentation to all agent workflow READMEs; added Makefile step to invoke new inject-configurable-close.sh script; introduced new bash script to dynamically inject ${{ inputs.close-older-issues }} into compiled lock files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • github-actions

Poem

🐰 Close-older-issues now sings with choice,
No more hardcoded strings rejoice!
From true to input, dynamic and free,
Workflows configurable, as they should be!
Scripts inject the logic we seek,
One toggle to rule them, so sleek. ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/configurable-close-option

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the close older issue option for scheduled reports configurable

2 participants