Fix post-steps indentation errors in YAML workflow generation#1868
Merged
Fix post-steps indentation errors in YAML workflow generation#1868
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>
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
Collaborator
|
Add 1 test agentic workflow with post jobs to catch compile issues. |
Collaborator
|
@copilot Add 1 test agentic workflow with post jobs to catch compile issues. |
Copilot
AI
changed the title
[WIP] Fix post-steps indentation errors in compiler
Fix post-steps indentation errors in YAML workflow generation
Oct 17, 2025
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
Added test-post-steps.md workflow in .github/workflows/ that demonstrates post-steps compilation with proper indentation validation. The workflow includes multiple post-steps with various configurations (conditional execution, artifact upload, step summary) and compiles successfully. See commit for details. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
Problem
The
generatePostStepsfunction was generating post-steps with incorrect indentation, causing YAML schema validation failures when compiling agentic workflows. Post-steps were rendered with 4-space indentation instead of the required 6-space indentation for GitHub Actions workflow steps.This resulted in validation errors like:
Solution
Updated the
generatePostStepsfunction inpkg/workflow/compiler.goto generate correct indentation that matches GitHub Actions schema requirements:- name:): 6 spaces instead of 4run:,uses:,with:): 8 spaces instead of 4with:): 10 spaces instead of 6Before (Incorrect)
After (Correct)
Additional Improvements
Testing
TestPostStepsIndentationFixthat validates indentation at all nesting levels.github/workflows/test-post-steps.mdto catch future compile issues with post-stepsmake recompileFixes #1867
Original prompt
Fixes #1867
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.