Add fix command for automatic codemod-style migrations of deprecated workflow fields#6367
Add fix command for automatic codemod-style migrations of deprecated workflow fields#6367
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…n check Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Add makefile target to run fix --write and add to agent-finish |
|
@copilot comment above |
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in commit 7996e1a:
The fix command successfully migrated |
|
|
@copilot the codemod for firewall fixes is wrong. network.firewall: true means sandbox.agent: awf Revert all agentic workflows and run fixes again. |
|
@copilot record the current version where a codemod was introduced. Show in list. |
…flag Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Completed in commit 2980612:
The flag runs
Completed in commit 2980612:
When running |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in commit a6698b8:
Fixed in commit a6698b8:
|
|
@copilot lint, fix tests |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and add slash_command codemod |
Completed in commit 0e88cd7:
|
Add comprehensive documentation for the new `gh aw fix` command introduced in PR #6367. This command automatically migrates deprecated workflow fields using codemods. Documentation includes: - Command description and usage examples - Available codemods with version information - Dry-run mode (default) and --write flag - Integration with compile command and make targets - All options and flags 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implementation Plan for
gh aw fixCommandfix_command.gowith command structure and CLI implementationtimeout_minutes→timeout-minutesfield renamenetwork.firewall→sandbox.agentmigrationcmd/gh-aw/main.go)make fixto rungh aw fix --writefixtarget intoagent-finishworkflowon.command→on.slash_commandmigrationSummary
Successfully implemented the
gh aw fixcommand that applies automatic codemod-style fixes to agentic workflow markdown files. The implementation includes:Features:
timeout_minutes→timeout-minutesmigration (v0.1.0)network.firewall→sandbox.agentmigration with correct value mapping (v0.1.0):firewall: true→sandbox.agent: awf(firewall enabled)firewall: falseornull→sandbox.agent: false(firewall disabled)on.command→on.slash_commandmigration (v0.2.0) ✓ Already present--writeflag to apply changes)--list-codemodsflag shows available fixes with version informationVersion Tracking:
IntroducedInfield tracking the version where it was added--list-codemodsdisplays version information for each codemodMakefile Integration:
make fixtarget that runs./gh-aw fix --writeagent-finishworkflow (runs after tests, before recompile)Compile Command Integration:
--fixflag to compile commandgh aw fix --writebefore compiling when flag is setApplied Fixes:
network.firewallwith correct logic:firewall: truenow correctly usesandbox.agent: awffirewall: falseusesandbox.agent: falseTesting & Validation:
make fmtmake lintLatest Changes from Main:
Usage:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.