-
Notifications
You must be signed in to change notification settings - Fork 87
Replace execSync with async exec in generate_git_patch.cjs #14715
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
Closed
Conversation
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
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot stopped work on behalf of
pelikhan due to an error
February 10, 2026 01:48
Contributor
|
@copilot keep working |
Copilot stopped work on behalf of
pelikhan due to an error
February 10, 2026 02:49
Contributor
|
@copilot keep working |
…ests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
|
@copilot exec is a builtin object to actions/github-script. Do not import |
…me compatibility Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
[WIP] Update process execution method in generate_git_patch.cjs
Replace execSync with async exec in generate_git_patch.cjs
Feb 10, 2026
…process Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
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.
Migrates
generate_git_patch.cjsfrom synchronousexecSyncto asynchronous execution for better performance and error handling.Changes Made
execSyncto async execution using a dual-context approach that detects the runtime environmentcreatePullRequestHandlerandpushToPullRequestBranchHandlerto be async functionsTechnical Details
The implementation uses a runtime detection pattern to support both execution contexts:
exec.getExecOutputAPI provided by actions/github-scriptchild_process.execThis dual-context approach ensures the code works seamlessly in both GitHub Actions workflows (via github-script) and MCP server environments without requiring package imports that aren't available at runtime.
Testing
make agent-finishcompleted successfullyThe code now uses modern async/await patterns instead of blocking synchronous calls, improving performance and allowing for better error handling while maintaining compatibility across different runtime environments.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.