Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added Expires field to CreateDiscussionsConfig - Updated parseDiscussionsConfig to parse expires field - Added XML comment with expiration date to created discussions - Created maintenance workflow generator - Added JavaScript script for closing expired discussions - Integrated maintenance workflow generation into compile command Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot add support for "create-issue" and issues as well. Refactor common code in separate embedded JavaScript file |
|
@copilot add to "create-pull-request" (without target-repo) |
Identified that expires value is being parsed from YAML but not populating the struct field. The configMap contains expires:7 but Expires field remains 0. Need to investigate type conversion issue in parseDiscussionsConfig. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added uint64 case to switch statement. The goccy/go-yaml library returns uint64 for positive integers in YAML, which wasn't being handled by the original int/int64/float64 cases. Now successfully parses and sets the expires value. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added Expires field to CreateIssuesConfig and CreatePullRequestsConfig structs - Added parsing logic for expires field (uint64, int64, int, float64) - Created shared expiration_helpers.cjs for common expiration logic - Updated create_discussion.cjs, create_issue.cjs, and create_pull_request.cjs to use helper - PR expires only works for same-repo PRs (when target-repo is not set) - Added environment variables: GH_AW_ISSUE_EXPIRES and GH_AW_PR_EXPIRES Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added expires support to create-issue with shared expiration logic refactored into
Added expires support to create-pull-request, but only for same-repo PRs (when target-repo is not set). The limitation ensures expiration only applies to PRs in the same repository where the workflow runs. Commit: 0ddea0f |
|
Also support relative time spec (7d, 1m...) |
|
@copilot comment above |
Added parseExpiresFromConfig helper that accepts both integer (days) and string formats: - 7d = 7 days - 2w = 14 days (2 weeks) - 1m = 30 days (1 month) - 1y = 365 days (1 year) Updated all three entity types (discussions, issues, PRs) to use the new helper. Updated JSON schema to accept both integer and string patterns. Tested with various formats and confirmed correct conversion to days. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done - added relative time spec support in commit f88980e
Added support for relative time specifications. The
Examples: expires: 7 # 7 days
expires: 2w # 14 days
expires: 1m # 30 days
expires: 1y # 365 daysCommit: f88980e |
Added `expires: 3d` to all 8 daily report agentic workflows that create discussions: - daily-code-metrics.md - daily-copilot-token-report.md - daily-firewall-report.md - daily-issues-report.md - daily-news.md - daily-performance-summary.md - daily-repo-chronicle.md - daily-team-status.md These discussions will now automatically expire after 3 days. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added
These discussions will now automatically close after 3 days. Commit: 94ba764 |
…quest, create-discussion) Added documentation for the new auto-expiration feature merged in PR #5775. The expires field automatically closes issues, PRs, and discussions after a specified time period. Changes: - Added expires field to create-issue section with time format examples - Added expires field to create-pull-request section (same-repo limitation) - Added expires field to create-discussion section - Documented automatic agentics-maintenance.yml workflow generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds support for automatically closing discussions, issues, and pull requests after a configurable expiration period. When any workflow uses the
expiresfield, a maintenance workflow is generated to periodically check and close expired entities.Changes
Core Implementation
expiresfield toCreateDiscussionsConfig,CreateIssuesConfig, andCreatePullRequestsConfigexpires: 7(7 days)expires: 7dor7D(7 days)expires: 2wor2W(14 days)expires: 1mor1M(30 days, approximate)expires: 1yor1Y(365 days, approximate)expiresfrom workflow frontmatter using sharedparseExpiresFromConfig()helperGH_AW_DISCUSSION_EXPIRESfor discussionsGH_AW_ISSUE_EXPIRESfor issuesGH_AW_PR_EXPIRESfor pull requests (only when target-repo is not set)<!-- gh-aw-expires: ISO8601 -->to entity body when createdShared JavaScript Helper
expiration_helpers.cjswith reusableaddExpirationComment()functionMaintenance Workflow
close_expired_discussions.cjsscript:> AI generated by)maintenance_workflow.goto generateagentics-maintenance.ymlwhen compile runs without specific workflow nameSchema & Registration
main_workflow_schema.jsonfor all three entity types (discussions, issues, PRs)^[0-9]+[dDwWmMyY]$close_expired_discussionsscript inscripts.goDaily Report Workflows
expires: 3dto all 8 daily report workflows that create discussions:daily-code-metrics.mddaily-copilot-token-report.mddaily-firewall-report.mddaily-issues-report.mddaily-news.mddaily-performance-summary.mddaily-repo-chronicle.mddaily-team-status.mdUsage
Discussions
Issues
Pull Requests (Same-Repo Only)
Important Notes
expiresfield for pull requests only works for same-repository PRs (whentarget-repois not set). This ensures expiration only applies to PRs in the same repository where the workflow runs.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.