feat: adding applyPatchContent and applyFiles for supporting autofix f…#1371
Merged
feat: adding applyPatchContent and applyFiles for supporting autofix f…#1371
Conversation
ramboz
approved these changes
Feb 24, 2026
Adds #buildPullRequestUrl instance method to construct the pull request URL from externalNumber and repoUrl. Supports GitHub and GitLab providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # package-lock.json # packages/spacecat-shared-cloud-manager-client/src/index.js
|
This PR will trigger a minor release when merged. |
vdua
approved these changes
Mar 26, 2026
solaris007
pushed a commit
that referenced
this pull request
Mar 31, 2026
## [@adobe/spacecat-shared-cloud-manager-client-v1.1.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-cloud-manager-client-v1.0.6...@adobe/spacecat-shared-cloud-manager-client-v1.1.0) (2026-03-31) ### Features * adding applyPatchContent and applyFiles for supporting autofix for code opportunities ([#1371](#1371)) ([5bb9c2a](5bb9c2a))
Member
|
🎉 This PR is included in version @adobe/spacecat-shared-cloud-manager-client-v1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Autofix flows are currently using patch content stored in the suggestion or patch files, not the actual patch, so added the following support
applyPatchContentfor applying patches from in-memory strings (no S3 download) andapplyFilesfor writing files directly to a clone and committing. These support autofix workflows where the patch content or file data is already available in memory.applyPatch,applyPatchContent,applyFiles) now share a single#applyChangesorchestration path that configures git identity, checks out the branch, runs the caller's apply callback, and optionally stages + commits.createPullRequestnow accepts an optionalrepoUrlparameter and constructs apullRequestUrlfrom the CM API response'sexternalNumber. Supports GitHub and GitLab providers (including self-hosted instances). This is needed because the CM API response does not include a pull request URL directly.Required for https://github.com/adobe/spacecat-autofix-worker/pull/445