Skip to content

Commit

Permalink
Upload acceptance artifacts before commenting on a pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx committed May 24, 2024
1 parent 88d1d5e commit 88d9c33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions acceptance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ func (a *acceptance) trigger(ctx context.Context) (*notify.Notification, error)
if err != nil {
return nil, fmt.Errorf("report: %w", err)
}
err = a.Upload(ctx, artifactDir)
if err != nil {
return nil, fmt.Errorf("upload artifact: %w", err)
}
// better be redacting twice, right?
summary := redact.ReplaceAll(report.StepSummary())
a.Action.AddStepSummary(summary)
err = a.AddOrUpdateComment(ctx, summary)
if err != nil {
return nil, fmt.Errorf("comment: %w", err)
}
err = a.Upload(ctx, artifactDir)
if err != nil {
return nil, fmt.Errorf("upload artifact: %w", err)
}
runUrl, err := a.RunURL(ctx)
if err != nil {
return nil, fmt.Errorf("run url: %w", err)
Expand Down

0 comments on commit 88d9c33

Please sign in to comment.