Skip to content

Commit

Permalink
Add checkbox to update preview status
Browse files Browse the repository at this point in the history
  • Loading branch information
taraspos committed Dec 11, 2024
1 parent ad8257b commit d835d23
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/amplify-preview/amplify.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (amp *AmplifyPreview) CreateBranch(ctx context.Context, branchName string)
}

if resp != nil {
logger.Info("Successfully created branch", logKeyAppID, appID, logKeyBranchName, resp.Branch.BranchName, logKeyJobID, resp.Branch.ActiveJobId)
logger.Info("Successfully created branch", logKeyAppID, appID, logKeyBranchName, *resp.Branch.BranchName, logKeyJobID, resp.Branch.ActiveJobId)
return resp.Branch, nil
}
}
Expand All @@ -134,7 +134,7 @@ func (amp *AmplifyPreview) StartJob(ctx context.Context, branch *types.Branch) (
AppId: &appID,
BranchName: branch.BranchName,
JobType: types.JobTypeRelease,
JobReason: aws.String("Initial job for PR-xxx"),
JobReason: aws.String("Initial job from GHA"),
})

if err != nil {
Expand Down Expand Up @@ -222,6 +222,8 @@ func amplifyJobToMarkdown(job *types.JobSummary, branch *types.Branch) string {

commentBody.WriteString(amplifyMarkdownHeader)
commentBody.WriteByte('\n')
commentBody.WriteString("- [ ] Check this box to update Preview status")
commentBody.WriteByte('\n')

// Markdown table header
commentBody.WriteString(strings.Join(mdTableHeader[:], " | "))
Expand Down

0 comments on commit d835d23

Please sign in to comment.