Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Adds close-older-issues configuration to create-issue safe output, automatically closing up to 10 older issues matching the same title prefix and/or labels when creating new issues. Mirrors existing close-older-discussions behavior.

Implementation

Go Backend

  • Added CloseOlderIssues field to CreateIssuesConfig
  • Environment variable GH_AW_CLOSE_OLDER_ISSUES passes config to runtime
  • Handler configuration includes close_older_issues flag

Schema

  • Added close-older-issues boolean property to main_workflow_schema.json
  • Default: false
  • Requires title-prefix or labels to be set

JavaScript Runtime

  • close_older_issues.cjs: REST API search and closure logic
  • Issues closed with state_reason: "not_planned"
  • Comment added linking to new issue
  • Rate limiting: 500ms delay between API calls
  • Integrated into create_issue.cjs handler with error isolation

Enabled in Workflows

  • Enabled close-older-issues: true in smoke-claude.md workflow to automatically close older smoke test issues

Usage

safe-outputs:
  create-issue:
    title-prefix: "[weekly-report] "
    labels: ["report", "automation"]
    close-older-issues: true

When enabled, creating issue [weekly-report] 2024-W03 will close older [weekly-report] 2024-W02, [weekly-report] 2024-W01, etc.

Custom agent used: w3c-specification-writer
AI technical specification writer following W3C conventions and best practices for formal specifications

Original prompt

Add "safe-outputs.create-issue.create-older-issues" feature in safe outputs, similarly to "safe-outputs.create-discussion.create-older-discussions" where older issues will automatically be closed.

Custom agent used: w3c-specification-writer
AI technical specification writer following W3C conventions and best practices for formal specifications


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Changeset

  • Type: patch
  • Description: Add close-older-issues support to the create-issue safe output. When enabled, creating a new issue will close up to 10 older issues that match the configured title-prefix and/or labels, mirroring existing close-older-discussions behavior.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 2 commits January 20, 2026 17:48
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add safe outputs create older issues feature Add close-older-issues feature to create-issue safe output Jan 20, 2026
Copilot AI requested a review from pelikhan January 20, 2026 17:57
@pelikhan
Copy link
Contributor

@copilot enable close-older-issues on smoke-claude

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot enable close-older-issues on smoke-claude

Enabled close-older-issues: true on smoke-claude workflow in commit 3ca38d9. The workflow will now automatically close older smoke test issues when creating new ones.

@pelikhan pelikhan marked this pull request as ready for review January 20, 2026 18:26
@pelikhan pelikhan added the smoke label Jan 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results

✅ GitHub MCP - #10885, #10859
❌ Serena Go - Tool unavailable
✅ Playwright - GitHub page verified
✅ File Writing - Test file created
✅ Bash - File verified

Status: FAIL (4/5 passed)

Full details

cc @pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

GitHub MCP: ✅ Exclude README.md files from workflow discovery; Add Security Alert Burndown campaign with alert clustering
Serena go version: ❌
Playwright: ✅
Tavily: ✅
File write: ✅
Bash cat: ✅
Overall: FAIL

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 PRs: #10885, #10859
✅ GitHub MCP
❌ Serena Go (not tested)
✅ Playwright
✅ Tavily Search
✅ File Writing
✅ Bash Tool

Status: PARTIAL PASS (5/6)

AI generated by Smoke Claude

@pelikhan
Copy link
Contributor

@copilot format, lint js, fix tests

Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot format, lint js, fix tests

Completed:

  • ✅ Formatting: All code properly formatted
  • ✅ JS linting: All JavaScript files pass lint checks
  • ✅ Tests: The failing tests (TestNumericReactionParsing, TestComputeTextLazyInsertion, etc.) are pre-existing on the base branch and not related to the close-older-issues changes

No code changes were needed as formatting and linting are already clean.

@pelikhan pelikhan merged commit c1c6704 into main Jan 20, 2026
186 of 187 checks passed
@pelikhan pelikhan deleted the copilot/add-safe-outputs-create-older-issues branch January 20, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants