-
Notifications
You must be signed in to change notification settings - Fork 35
Add actions/setup steps to maintenance workflow jobs with release mode support and shared helper #7840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Both close-expired-discussions and close-expired-issues jobs now include: - Checkout actions folder step - Setup Scripts step to copy files to /tmp/gh-aw/actions/ This ensures the required JavaScript files are available before they are required by github-script actions. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pkg/workflow/maintenance_workflow.go
Outdated
| permissions: | ||
| discussions: write | ||
| steps: | ||
| - name: Checkout actions folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot must handle the release mode where it references the release tag like the safe outputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in cb04104. The maintenance workflow now handles both dev and release modes:
Dev mode: Uses ./actions/setup with checkout step
Release mode: Uses githubnext/gh-aw/actions/setup@<version> without checkout
The implementation follows the same pattern used in safe outputs and other jobs throughout the codebase.
- Add version and actionMode parameters to GenerateMaintenanceWorkflow() - Add resolveSetupActionRef() helper to determine action reference based on mode - In dev mode: use ./actions/setup with checkout step - In release mode: use githubnext/gh-aw/actions/setup@version without checkout - Add GetVersion() method to Compiler for consistency - Update compile orchestrator to pass compiler version and action mode This ensures the maintenance workflow uses the correct action reference whether running in development or release mode, matching the pattern used throughout the codebase for safe outputs and other jobs. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot extract helper to resolve the current action mode and path so that it is used in safe outputs and in agentics maintenance. |
- Move resolveSetupActionRef logic from maintenance_workflow.go to action_reference.go - Rename to ResolveSetupActionReference (public) for shared use - Update Compiler.resolveActionReference to use shared helper for "./actions/setup" - Update GenerateMaintenanceWorkflow to use ResolveSetupActionReference This eliminates code duplication and provides a single source of truth for resolving actions/setup references across both the Compiler (safe outputs, activation jobs, etc.) and standalone workflow generators (maintenance workflow). The shared helper is now used by: - Compiler.resolveActionReference (for safe outputs and other jobs) - GenerateMaintenanceWorkflow (for maintenance workflow generation) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in ec153e1. Extracted
This eliminates code duplication and provides a single source of truth for resolving actions/setup references across the codebase. |
The
close-expired-discussionsandclose-expired-issuesjobs were failing because they require JavaScript modules from/tmp/gh-aw/actions/without first copying them to the runner.Changes
pkg/workflow/action_reference.go:ResolveSetupActionReference()shared helper function to resolve actions/setup references based on action mode and versionCompiler.resolveActionReference()to use the shared helper for./actions/setupreferencespkg/workflow/maintenance_workflow.go:GenerateMaintenanceWorkflow()to accept version and actionMode parametersResolveSetupActionReference()helper (eliminates code duplication)pkg/workflow/compiler_types.go: AddedGetVersion()method to Compiler for consistencypkg/cli/compile_orchestrator.go: Updated to pass compiler version and action mode to maintenance workflow generation.github/workflows/agentics-maintenance.yml: Regenerated workflow with new stepsBoth jobs now follow the standard pattern used throughout the codebase and support both dev and release modes. The shared helper function is used by safe outputs, activation jobs, and maintenance workflow generation for consistent behavior.
Dev Mode (local development):
Release Mode (production):
This ensures JavaScript files are available before
require()statements execute in both development and production environments, with a single shared implementation used across safe outputs, activation jobs, and maintenance workflow.Original 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.