-
Notifications
You must be signed in to change notification settings - Fork 35
Add --push flag to run command for automatic workflow commit and dispatch #8971
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
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
|
@copilot recompile if you detect that the .lock.yml is outdated |
Co-authored-by: pelikhan <[email protected]>
Done! The The implementation:
Commit: 30608fb |
Co-authored-by: pelikhan <[email protected]>
|
Ask confirmation to the user before commit/pushing |
|
@copilot ask |
Co-authored-by: pelikhan <[email protected]>
Added confirmation prompt! Before committing and pushing, the system now:
The prompt follows the same pattern as the trial command for consistency. Commit: 7fb10cd |
|
Use bubble tea to implement asking the user @copilot |
Co-authored-by: pelikhan <[email protected]>
Implemented! The confirmation now uses Bubble Tea (huh) with an interactive dialog: Features:
Implementation:
Commit: bd74add |
|
@copilot move huh form to a helper in the console package |
Co-authored-by: pelikhan <[email protected]>
Done! Created a reusable helper in the console package: New files:
Benefits:
The implementation provides a clean separation of concerns with UI components in the console package. Commit: cb1afbd |
|
@copilot check that the current branch matches the --ref value of any. Switching branches can be tricky and is not supported. |
Co-authored-by: pelikhan <[email protected]>
Implemented! The Behavior:
Error message: This prevents accidental commits to the wrong branch and makes it explicit that users must be on the correct branch before using Commit: 5895b64 |
|
@copilot branch validation only happens if there are changes to commit |
Co-authored-by: pelikhan <[email protected]>
Done! Branch validation now happens only after we've detected there are changes to commit. Flow:
This prevents unnecessary branch validation when workflows are already up-to-date. Commit: b795625 |
|
@copilot format, lint go |
Co-authored-by: pelikhan <[email protected]>
|
Fix lint go issues |
|
@copilot fix more lint go Run export PATH="$PATH:$(go env GOPATH)/bin"
|
Co-authored-by: pelikhan <[email protected]>
All linting issues have been resolved in commit dbdf37b. The changes address all 7 issues reported by golint-incremental.
... Fixed all 7 linting issues: testifylint (3 issues):
unconvert (2 issues):
unused (2 issues):
Commit: dbdf37b |
Add documentation for the --push flag feature added in PR #8971. This flag provides an all-in-one workflow update and execution experience by automatically recompiling, staging, committing, pushing, and dispatching workflows. Changes: - Add --push and --ref options to run command documentation - Add detailed section explaining --push flag functionality - Update beginner workflows section with --push example - Add usage examples for common scenarios Related: #8971
Add documentation for the --push flag feature added in PR #8971. This flag provides an all-in-one workflow update and execution experience by automatically recompiling, staging, committing, pushing, and dispatching workflows. Changes: - Add --push and --ref options to run command documentation - Add detailed section explaining --push flag functionality - Update beginner workflows section with --push example - Add usage examples for common scenarios Related: #8971 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Implementation Plan for --push Flag
Summary
Successfully implemented the
--pushflag with all linting issues resolved:Key Features:
.lock.ymlis outdated and automatically recompiles (when using --push)--pushinstead of compile commandIsAccessibleMode()functionLinting Fixes (7 issues resolved):
testifylint issues (3 fixed):
pkg/cli/run_push_test.go:382- Changedassert.Errortorequire.Errorfor error assertionspkg/workflow/compiler_safe_outputs_config_test.go:299- Changedassert.Equaltoassert.InDeltafor float comparisonpkg/workflow/compiler_safe_outputs_config_test.go:620- Changedassert.Equaltoassert.InDeltafor float comparisonunconvert issues (2 fixed):
pkg/workflow/compiler_safe_outputs_job_test.go:124- Removed unnecessary doublestring()conversionpkg/workflow/compiler_safe_outputs_job_test.go:140- Removed unnecessary doublestring()conversionunused variable issues (2 fixed):
pkg/workflow/compiler_safe_outputs_config.go:10- Removed unused logger variableconsolidatedSafeOutputsConfigLogpkg/workflow/compiler_safe_outputs_env.go:7- Removed unused logger variableconsolidatedSafeOutputsEnvLogVerification:
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.