Generate maintenance workflow when compiling specific files#10883
Merged
Generate maintenance workflow when compiling specific files#10883
Conversation
- Add maintenance workflow generation to runPostProcessing function in compile_orchestration.go - When compiling specific files, parse ALL workflows in the directory to check for expires fields - Create parseAllWorkflowsInDirectory helper function to parse all workflows in directory - Add tests to verify maintenance workflow generation for specific files - Fix: Use default workflow dir (.github/workflows) when not specified - Tests: TestCompileSpecificFiles_GeneratesMaintenanceWorkflow and TestCompileSpecificFiles_DeletesMaintenanceWorkflow 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 agentic-maintenance workflow generation on init
Generate maintenance workflow when compiling specific files
Jan 20, 2026
Contributor
|
@copilot ignore agentic-maintenance if --dir option is used |
- Modified runPostProcessing and runPostProcessingForDirectory to check if config.WorkflowDir is empty - Maintenance workflow is only generated for default .github/workflows directory - Added test TestCompileWithCustomDir_SkipsMaintenanceWorkflow to verify behavior - Updated existing tests to use empty WorkflowDir (default) instead of explicit ".github/workflows" Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done. The maintenance workflow is now skipped when using the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintenance workflow generation was only triggered when compiling all workflows (
gh aw compile), not when compiling specific files (gh aw compile workflow1.md workflow2.md).Changes
runPostProcessingto generate maintenance workflow for specific file compilationparseAllWorkflowsInDirectoryhelper that scans all.mdfiles in the workflow directory to detectexpiresfield usage, ensuring maintenance workflow reflects the full directory state regardless of which files were compiled.github/workflowswhenconfig.WorkflowDiris empty--diroption to avoid generating maintenance workflows in non-standard directoriesBehavior
The maintenance workflow is generated/updated when any workflow uses
safe-outputs.create-issue.expiresorsafe-outputs.create-discussion.expires, and deleted when none do. This only applies to the default.github/workflowsdirectory.Testing
TestCompileSpecificFiles_GeneratesMaintenanceWorkflowto verify maintenance workflow generation for specific filesTestCompileSpecificFiles_DeletesMaintenanceWorkflowto verify deletion when no expires fields existTestCompileWithCustomDir_SkipsMaintenanceWorkflowto verify skipping behavior for custom directoriesOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.