Skip to content

Commit 750770f

Browse files
dhasani23David Hasani
andauthored
feat(amazonq): auto-download results (#6519)
## Problem Transformation results/artifacts expire after 24h, and sometimes users forget to manually click the "Download Proposed Changes" button within that time period. ## Solution Auto-download the results from S3 when ready. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: David Hasani <[email protected]>
1 parent 19d0346 commit 750770f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "/transform: automatically download results when ready"
4+
}

packages/core/src/codewhisperer/commands/startTransformByQ.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,12 @@ export async function postTransformationJob() {
775775
if (transformByQState.getPayloadFilePath() !== '') {
776776
fs.rmSync(transformByQState.getPayloadFilePath(), { recursive: true, force: true }) // delete ZIP if it exists
777777
}
778+
779+
// attempt download for user
780+
// TODO: refactor as explained here https://github.com/aws/aws-toolkit-vscode/pull/6519/files#r1946873107
781+
if (transformByQState.isSucceeded() || transformByQState.isPartiallySucceeded()) {
782+
await vscode.commands.executeCommand('aws.amazonq.transformationHub.reviewChanges.startReview')
783+
}
778784
}
779785

780786
export async function transformationJobErrorHandler(error: any) {

0 commit comments

Comments
 (0)